Tag Info

Hot answers tagged

6

The following remarks are crucial when we are to solve equations symbolically: So far (in general) Mathematica cannot solve transcendental equations when two unknowns are involved, nevervetheless in some exceptional cases it may seem like it could (see e.g. How do I solve this equation?). This is also the case when some symbolic constants are involved ...


5

There are a few problems with your code. Allow me to highlight them and guide you to a solution. First of all, the proper way to define a function in Mathematica is using :=. So your code should read F[x_] := NSum[Exp[-x BesselJZero[0, a]^2]/BesselJZero[0, a]^2, {a, 1, Infinity}] Furthermore, you should note that the zeroes of the Bessel function are ...


5

Many times I've found Mathematica to be way better solving equations, when trigonometric functions are written with exponential functions. This time is no exception: Solve[FullSimplify[TrigToExp[-2 (m^2/36 + n^2/4)^(1/4) Sin[1/2 ArcTan[n/2,-(m/6)]]==y]],n] {{n -> (m^2 - 9 y^4)/(18 y^2)}}


4

Here is some preprocessing that might be useful. We will get rid of radicals "by hand", and eliminate variables using GroebnerBasis. The end result will be a single (complicated) expression in several variables. eqns = {x == (Etot - M - MI)/( Etot + 1/4 (Kd - Sqrt[Kd] Sqrt[8 Etot + Kd])), Etot == 2 Di + M + Inh M, Itot == Inh + MI, Kd == M^2/Di, ...


4

Numerical solution: sol[a_] := {a, α} /. First@NSolve[ Tan[a*Sqrt[α]] + Tan[(1 - a)*Sqrt[α]] == Sqrt[α] && 5 <= α <= 35, α]} // Quiet ListLinePlot[sol /@ Range[0, 0.5, 0.01]] I don't know why ContourPlot doesn't work well,even though I change some options of ContourPlot.Maybe it is because there are some singular points. ...


4

The equation is numerically unstable. The second root is not valid at machine precision so is rejected. Higher precision is required to arrive at a valid second root. Use Solve to see exact solutions as root objects. Then use higher precision when converting root objects to numbers. k = .2; eqn = Rationalize[2 r^2 - .2 r^(k + 2) - 1 == 0]; sol = Solve[eqn, ...


4

The problem here can arise because of numerical underflow which appears for sufficiently large dimension of the problem. Some numerically very small number multiplies the parameter "a" and therefore "a" does not appear in the "solution". Consider a simple example Define the matrix m (fill it with random numbers, here exponentially distributed) In[263]:= ...


3

Reduce has its own syntax for specifying constrains and domains. Please try this: Reduce[2*a*b*n*c*Q - 3*a*b*n*p*c*Q + a*b*n*p^2*c*Q - 4*a^2*b*n*p*Q^2 - 4*a*b^2*n*p*Q^2 + 6*a^2*b*n*p^2*Q^2 + 6*a*b^2*n*p^2*Q^2 - 2*a^2*b*n*p^3*Q^2 - 2*a*b^2*n*p^3*Q^2 + a^2*b*c*Q^2 + a*b^2*c*Q^2 - 2*a^2*b*p*c*Q^2 - 2*a*b^2*p*c*Q^2 == 0 && 0 < a ...


3

Please check the result by doing the following eqn = FullSimplify[ 2*a*b*n*c*Q - 3*a*b*n*p*c*Q + a*b*n*p^2*c*Q - 4*a^2*b*n*p*Q^2 - 4*a*b^2*n*p*Q^2 + 6*a^2*b*n*p^2*Q^2 + 6*a*b^2*n*p^2*Q^2 - 2*a^2*b*n*p^3*Q^2 - 2*a*b^2*n*p^3*Q^2 + a^2*b*c*Q^2 + a*b^2*c*Q^2 - 2*a^2*b*p*c*Q^2 - 2*a*b^2*p*c*Q^2 == 0] // TraditionalForm This returns ...


3

Plot[2 x - Sinh[x], {x, -Pi, Pi}] FindRoot[2 x == Sinh[x], {x, #}] & /@ {-2, 0, 2} {{x -> -2.17732}, {x -> 0.}, {x -> 2.17732}}


3

The Method option in LQOutputRegulatorGains is not documented yet and seems to be going through several iterations. This is what works for the different versions. v8: Method -> {"RiccatiSolveOptions" -> {Method -> "Eigensystem"}} v9: Method -> {"Riccati", {Method-> "Eigensystem"}} v10:Method ->{"Riccati"->{Method-> ...


3

Just a way to visualize by rearranging (noting Chenminqi 's observation). Uses: $tan(x)+tan(y)=sin(x+y)/(cos(x)cos(y))$. Limiting range important to avoid periodicity and singularities: cp = ContourPlot[ Sin[Sqrt[y]]/Sqrt[y] == Cos[(1 - x) Sqrt[y]] Cos[ x Sqrt[y]], {x, 0, 0.5}, {y, 0, 35}, FrameLabel -> {"a", "\[Alpha]"}, BaseStyle -> 20]; ...


3

This gives the solution to the equation: temp = Solve[eqn[x, y, z], D[y[x, z], x]] This extracts the value of the rule: res = D[y[x, z], x] /. temp This evaluates the result at the requested coordinates: res /. {x -> 1, y -> 1, z -> 1} (* {9} *)


3

I post this only for insights into solving this equation (given the discussion) and ambiguity of interpretation...and for fun. I have alread +1 Artes answer. f[x_] := Sqrt[x] + Sqrt[1 - x^2]; g[x_] := Sqrt[2 - 3 x - 4 x^2]; Note the domain that f(x)-g(x) is real valued. dom = Reduce[x > 0 && Abs[x] < 1 && 2 - 3 x - 4 x^2 > 0] ...


3

We can find the minimum-producing argument x as a function of n2 using NDSolve. We need only find an initial minimum and a differential equation for the trace of the minima. In fact, we can integrate the minimum value of eisl and return a single function that yields the minimum for each n2. Given that the parameters b,e0,g,gamma,p,epsilon`, are (constant) ...


3

ToRules is useful here. If we manually set a value to the parameter C[1], we can convert the remaining expression to a list of rules similar to what Solve would return: In[5]:= rules = {ToRules[sol /. C[1] -> 0]} Out[5]= {{phi -> -ArcCos[-(Csc[theta]/Sqrt[3])]}, {phi -> ArcCos[-(Csc[theta]/Sqrt[3])]}, {phi -> ...


2

Clear["Global`*"]; f[rx_, ry_] := Module[{d1, d2, d3, a, b, c, sol1, sol2, data}, {d1, d2, d3} = # - {rx, ry} & /@ {{0, -1}, {Sqrt[3]/2, 1/2}, {-Sqrt[3]/2, 1/2}}; {a, b, c} = Norm[#]^-3 & /@ {d1, d2, d3}; sol1 = NSolve[a b (d2 - d1) Sin[{x, y}.(d1 - d2)] + b c (d3 - d2) Sin[{x, y}.(d2 - d3)] + a c (d3 - d1) Sin[{x, y}.(d1 ...


2

iter = Reap[FindRoot[Sin@x == Cos[x], {x, 0}, EvaluationMonitor :> Sow[x]]] {{x -> 0.785398}, {{0., 1., 0.782042, 0.785398, 0.785398}}} Length@Last@Last@iter - 1 4


2

Options[FindRoot] (* {AccuracyGoal -> Automatic, Compiled -> Automatic, DampingFactor -> 1, Evaluated -> True, EvaluationMonitor -> None, Jacobian -> Automatic, MaxIterations -> 100, Method -> Automatic, PrecisionGoal -> Automatic, StepMonitor -> None, WorkingPrecision -> MachinePrecision} *) ?? EvaluationMonitor (* ...


2

This does not solve the equation (in the following I just let $w=1$), of which there are infinite, but I hope provides insights. The surface of solutions is sectioned by desired x value. sol[g_, x0_] := Module[{p, l, sn}, p = g[[1, 1]]; l = Cases[g, Line[w___] :> w, Infinity]; sn = Select[p[[#]] & /@ l, #[[1, 1]] == x0 &]; ...


2

Symbolically solve this equation: Solve[Tan[a Sqrt[α]]+Tan[(1-a) Sqrt[α]]==Sqrt[α]//TrigToExp,a] Solve[Tan[a Sqrt[α]]+Tan[(1-a) Sqrt[α]]==Sqrt[α]/.a->ArcTan[x]/Sqrt[α] //FullSimplify,x] Updated: expr=Tan[a*Sqrt[α]]+Tan[(1-a)*Sqrt[α]]-Sqrt[α]; expr=FullSimplify@ReleaseHold@Numerator@Together[expr/.Tan[x_]:>Sin[x]/Hold@Cos[x]] ...


2

Funny problem. I like it. But there is must be something else in the condition of the problem? Or I misunderstand you. You say that I am guaranteed that w1, w2 exist Ok. Let's set v1 = {0, 0, 0, 1}; v2 = {1, 0, 0, 0}; it's independent vectors. Then find w1 and w2 in general case for this example: w1 = v1*a1 + v2*b1 w2 = v1*a2 + v2*b2 ...


2

Something like this: ComplexExpand[ Solve[ { Re[(1 - Sqrt[x - I y])/(1 + Sqrt[x - I y])] == A, Im[(1 - Sqrt[x - I y])/(1 + Sqrt[x - I y])] == B }, {A, B} ], TargetFunctions -> {Re, Im} ] (* {{A -> 1/((1 + (x^2 + y^2)^(1/4)*Cos[(1/2)*ArcTan[x, -y]])^2 + Sqrt[x^2 + y^2]*Sin[(1/2)*ArcTan[x, -y]]^2) - ...


2

a[0] = 1; a[1] = a[2] = a[3] = a[5] = 0; a[4] = g2/20; funcs = Table[a[n] == Sum[(m - 1) a[m] b[n - m], {m, 0, n}], {n, 0, 5}] var = b /@ Range[0, 5] Solve[funcs, var]


1

TraditionalForm@FullSimplify@Exp[FullSimplify@PowerExpand[ Log[((Ft Bcr)^(2 p + 4)*Ft^(23 p - 4))/(Bcr^(1/(2.5 p - 4))* Ft^((24 p + 4)/(3 p - 1)))^(3 p - 6)]]] $\text{Ft}^{p+\frac{60}{3 p-1}+36} \text{Bcr}^{-\frac{1.2}{4.\, -2.5 p}+2. p+2.8}$


1

Because s[t] is decreasing whenever p < 1, s[t] - myPreviousStep < 10^-4 will always be True. WhenEvent[cond, action] evaluates action when the condition changes from False to True; however, the condition is always True when p < 1. You need something like Abs[s[t] - myPreviousStep] < 10^-4, instead. Note that if p is closer to 1 than 10^-4, ...


1

This is really a comment, but for ease of reading... Adjusting your code slightly, we note some useful information: Remove["Global`*"] L3 = 2 c1 + 4 c2 + Sqrt[24 c1^2 + 16 c1 c2 + 16 c2^2]; L4 = 1/2 (4 c1 + 8 c2 - 2 Sqrt[24 c1^2 + 16 c1 c2 + 16 c2^2]); soln = Solve[{L3 == K3, L4 == K4}, {c1, c2}]; {L3, L4} /. First@soln // Simplify (* {1/2 (K3 + Sqrt[(K3 ...


1

Without making assumptions on the parameters except that they are real, one easily observes that the original equation is equivalent to the following: eq1 = -a E^(-(x/b)) - c E^(-(x/d)) == f where (* f = Log[Y] *). With the exchange: eq2 = eq1 /. x -> -b*Log[y] one obtains this: (* -a y - c y^(b/d) == f *) By rescaling y -> A*z: eq3 ...


1

Here we can see that the two sides, for r == 4. are not equal near 1.6: With[{i = 6}, Plot[pot[Er[[i]][[1]], x] - Er[[i]][[2]], {x, -0.3, 1.7}, PlotLabel -> Row[{"r = ", r[[i]]}]] ] Here we see it has no real solutions at all: With[{i = 6}, Reduce[pot[Er[[i]][[1]], x] - Er[[i]][[2]] > 0, x, Reals] ] Reduce::ratnz: Reduce was unable to ...


1

thank you all for your suggestions. They have been very helpful. I concluded that by defining 2 functions, as in the following: x0 = {x -> 1}; f1[a_?NumericQ] := {x0 = FindRoot[x == E^(-a x), {x, x0[[1, 2]]}]}; f2[a_] := x /. f1[a]; I can Plot[f2[a],{a,0,2}] and obtain what I wanted. Now, moving on to my real problem. What I really want to do is ...



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