Tag Info

Hot answers tagged

6

As Guesswhoitis already suggested, this is a machine precision issue. So let us do your computation with arbitrary precision numbers. For doing so, all machine numbers have to be replaced with arbitrary precision numbers, otherwise the computation falls back to machine numbers. In the following command I have done this by placing `30 after each machine ...


6

Update Based on Guesswhoitis. answer I have improved my ugly code and use his approach. Otherwise the format is as outlined in original answer. Manipulate[p = {-a, 0}; q = {0, b}; r = {c, 0}; s = mp[a, b, c]; nfb = RegionNearest[Circle[{0, 0}, b]]; nfc = RegionNearest[Circle[{0, 0}, c]]; res = VectorAngle @@@ Partition[Join[{{-a, 0}}, sc[#] & /@ ...


5

In at least the univariate case, the guess of "Newton-Raphson" is not too far off. Daniel mentions the three possible methods supported by NSolve[]/NRoot[] in his comment. "CompanionMatrix" is likely done by forming the Frobenius companion matrix from the polynomial's coefficients, and then performing the usual QR algorithm to extract the eigenvalues, so ...


5

Since "Visualizing the resulting triangle is left as an exercise for the interested reader" and I am interested here is a visualization of J.M.'s numeric solution. DynamicModule[{corners, perimeter, sol, u, v, pts}, Manipulate[ corners = {{-c, 0}, b {(1 - u^2)/(1 + u^2), 2 u/(1 + u^2)}, a {(1 - v^2)/(1 + v^2), 2 v/(1 + v^2)}}; perimeter[u_, v_] = ...


4

The purpose of this answer is to give simple, clear answers to the simple component questions, How to draw an infinite tangent line? How to draw an infinite secant line? I will use the V10+ InfiniteLine, which Mr.Wizard has already pointed out as a way to draw an infinite line. See also the Note below. How to draw a tangent line Round about the eighth ...


3

This problem is more related to physics other than Mathemaitca. The solution isn't wrong and special care should be paid when analysing dimensions in logarithm. "Inconsistancy" of the dimensions in logarithm is quite common and necessary in physics. Let's take a naive example to illustate the "inconsistancy": $$\int \frac{1}{x} dx$$ Everyone knows that ...


3

Your problem is the Set. Set means you're assigning something to a variable (=), x2 Sin[x2] is not a variable. Try Equal[] instead, this is equivalent to ==. Vars = {{(x1) Cos[x2], Sin[x2], 0, (x3) (Sin[x2])}, {(Cos[x2]) (Sin[x4]), (x3) Cos[x4], 1, x1}}; Const = {{1, 0, 0, 1}, {0, 1, 1, 2}}; MapThread[Equal, {Vars, Const}, 2] yields the output: {{x1 ...


2

First of all, note the difference between = (assignment) and == (equality). Take a look at NSolve examples which all use ==. NSolve is limited in what sorts of equations it can solve, but when it can solve an equation, it will try to get all solutions. The result it gives you is a fairly general one, and it's valid for any C[1] that is an integer. If you ...


2

You have to use Equal (==) instead of Set (=) for the equation and add Reals as a third argument to NSolve to restrict all variables, parameters, and function values to be real NSolve[270 == 399.99999999999966 E^(-0.3 t) (0.058035714285714336 - 0.8705357142857142 E^(0.27999999999999997 t) + E^(0.3 t)), t, Reals] {{t -> -8.31446}, {t -> ...


2

This is an incomplete answer, but we will be able to show that there is no solution for most values of θ and ϕ. We will also be able to draw a plot of the regions of interest that you should check further to find solutions, should they exist. M = {{s - w, ab, ac}, {ab, s - w, bc}, {ac, bc, s - w}}; {d, c, b, a} = CoefficientList[Det[M], w]; disc = ...


2

Starting with bbgodfrey's excellent suggestion to solve ab == ac == bc == 0, we can obtain a fairly compact list of all of the solutions. If we Reduce the equations with conditions on the variables we get a complicated result, so it's easier to Reduce first and apply conditions after: Reduce the equations and throw out some obviously inconsistent results: ...


2

Further edited to simplify results It is not difficult to show that the three eigenvalues, w, of M are equal if and only if M is diagonal; i.e., ab = ac = bc = 0. f[e_] := 2 Norm[e]^-3 (1 - 3 Sin[θ]^2 Cos[ϕ - ArcTan[e[[1]], e[[2]]]]^2) Cos[{x, y}.e] abeval = f[{1, 0}] (* 2 Cos[x] (1 - 3 Cos[ϕ]^2 Sin[θ]^2) *) aceval = f[{0, 1}] (* 2 Cos[y] (1 - 3 Sin[θ]^2 ...


2

It has been noted a fair number of times on this site that one can use the MeshFunctions option of Plot[] to help in root-finding. Applied to this case: ie[x_] := Im[Exp[1/2 + I x]] iz[x_] := Im[Zeta[1/2 + I x]] pic = Plot[{ie[x], iz[x]}, {x, 0, 20}, Mesh -> {{0.}}, MeshFunctions -> {(ie[#] - iz[#]) &}, MeshStyle -> ...


1

You can use Rationalize to convert numbers to exact numbers gammaex = 0.2506 // Rationalize[#, 0] &; omega[t_] = 2.43163218375*10^7*Exp[1700*(1/298.15 - 1/(273.15 + t))] // Rationalize[#, 0] &; w[t_] = (3.414105049212413*10^12)/(omega[t]) // Rationalize[#, 0] &; v[t_] = Sqrt[661.6469313477045*(t + 273.15)] // Rationalize[#, 0] &; ...


1

Your definition of c and d are not related to any other variables, so the system is fundamentally underdetermined as you have written it. It is as if you wrote $$c = a + x, \quad d = b + y, \quad r^2 = a^2 + b^2,$$ and you want to solve for $a,b$. Moreover, you have a syntax error, which is why Mathematica will not complete the evaluation. The == symbol ...



Only top voted, non community-wiki answers of a minimum length are eligible