# Tag Info

## New answers tagged equation-solving

0

Clear["Global*"] g = P*(S - s)/(w*x*nl); sqre = Sqrt[(1 - x*g)^2 - (4*g)]; In the Reduce the inequalities have to be a single expression: either a List or joined by And (&&). Your xg must be either x g or x*g sol = Reduce[{(3 + x*g > -sqre), P > 0, S > 0, w > 0, x > 0, nl > 0, 0 <= s <= S}, s, Reals] w > ...

2

Is this what you are looking for? ClearAll[r, a, p, x, y]; ComplexExpand@Solve[-r a p - (x + y*I) - a *Conjugate[r] == 0, r] which is different from the answer in the book. What is the book answer? Also in Mathematica be careful with space. yI is not the same as y*I. Also You can use ComplexExpand instead of assuming variables are real.

1

Tried this: k = 2; EE = 0; \[Epsilon] = 1; poly[r_] := r^4/pyz^2 (pt^2 + (r^((-2 (4 k^2 - 3 k + 2))/((k - 1) (2 k - 1))) ((pt^2 - (pyz^2 + pyz^2) - \[Epsilon]* r^2) r^((4 k)/(k - 1)) + (pyz^2 + pyz^2 + \[Epsilon]*r^2)*r^(5/(k - 1))) + EE)); atLeastOne = Exists[r, r > 0 && poly[r] == 0]; atLeastTwo ...

3

We can also using GSL via LibraryLink, almost ten times faster than before. LaunchKernels[]; ParallelMap[roots, Tuples[N@{-1, 1}, 15]]; // RepeatedTiming {1.1, Null} gslRoots@Tuples[N@{-1, 1}, 15]; // RepeatedTiming {0.12, Null} It only takes about 3 minutes to calculate the roots of all polynomial equations of degree 24 with a coefficient of ±1. For ...

3

Minimize[{m, m > 0 && 31/10 m == 1/2 k && k ∈ Integers}, {m, k}, Integers] {5, {m -> 5, k -> 31}} Thanks @BobHanlon Minimize[{m, m > 0 && 3.1 m == .5 k // Rationalize} , {m, k}, Integers]

2

The equation can be set into a form $$\dfrac{A}{x^2} + B x^2 y = P \log x +Q$$ so it can be solved algebraically, no need to use Mathematica: $$y(x) = \dfrac{ P \log x + Q - \dfrac{A}{x^2} }{Bx^2}$$ For some arbitrarily chosen constants the above is plotted... and level contour lines can be drawn if so required. It may help to understand the physical ...

1

modified(!question changed!) equation eq=Log[S\[Infinity]S0] - R0 (S\[Infinity]S0 S0n - 1) == 0 now depends on two parameters R0,S0n=S0/n and is solved for S\[Infinity]S0=S\[Infinity]/S0 sol=Solve[eq,S\[Infinity]S0 ][[1]] (*{S\[Infinity]S0 -> -(ProductLog[-E^-R0 R0 S0n]/(R0 S0n))}*) Plot3D[S\[Infinity]S0 /. sol , {S0n, 0, 2}, {R0, 0, 3},MeshFunctions -...

1

I have had to make several assumptions about what you are doing but this seems to be a way forward. First I am going to ignore your constraints to begin with and just try and find some solutions. I start by defining your equations and then solving the equations in your Step 1. I then look at the equations you wish to solve in your Step 2 and substitute in ...

5

Up to the documentation, "SolveAlways works primarily with linear and polynomial equations". In view of it, we will work with the quantifier ForAll instead of SolveAlways. We consider the identity over the positive reals at the beginning. If two expressions are equal, then their derivatives are equal too: ForAll[x, x > 0, D[2 b Log[-1 + (3 (x - ...

6

Your call to SolveAlways asks Mathematica to find values for x such that the equation holds for all possible values of a, b, c and d which does not help with the question. To solve for a, b, c and d in terms of x you can ask for the most generic solution with eqn = -4*b + d + 2*b*Log[-1 + (3*(-c + x))/a] == Log[x] Reduce[eqn, {a,b,c,d}] which is only able ...

1

If you change to non-powered variables {xs1,ys1,x1}, you get solutions for at least rational a of the form a = 1/( 2 b) with b being positive integers. First get conditions for changed variables and then test your inequation. {a = 1/Pi, red = List @@ Reduce[{xs^a == xs1, ys^a == ys1, x^a == x1, 0 < xs < 10000, 0 < ys < 12000, 0 < x < ...

2

Introduce an additional variable (here a) that you use nowhere in the equations. (It's just to provide three variables for three equations.) eqn1 = y - 2 x*y; eqn2 = 2 x*y - y; FindRoot[{eqn1 == 0, eqn2 == 0, (x + y - 1) == 0}, {{x, 0.2}, {y, 2}, {a, 2}}] (* {x -> 0.5, y -> 0.5, a -> 2.} *) eqn1 = y - 2 x*y; eqn2 = 2 x*y - y; FindRoot[{...

3

I do not think that Solve or NSolve are able to handle this equation even with the values you provided in the comments. Best thing I was able to produce was a single particular solution using FindInstance: G[Q_] := 1/40 (x)^(1/5)*1/(12*Q^(1/5) (1 + Q)^(6/5)) (-32 (10125/(125 x)) Log[Q (1 + Q)^6] + 15 (1 + Q) (-4 + 20 Q -15 Q (1 + Q) Hypergeometric2F1[1, 8/5, ...

0

NSolve for a given range of t solves your problem: NSolve[{h[t] == 0, -10 < t < 10}, t] (*{{t -> -0.199542}, {t -> 0.642034}, {t -> 3.05298}, {t -> 4.39012}}*)

0

Similar to @DanielHuber's answer ContourPlot visualizes the completeness of the real solution x==(4 y)/(1 + y)^2 Show[{ContourPlot[x/(1 + Sqrt[1 - x])^2 == y, {x, -2, 2}, {y, -1, 1}] , ParametricPlot[{ (4 y)/(1 + y)^2, y}, {y, -1, 1},PlotStyle -> {Dashed, Thickness[.01], Red}]}]

3

At the end of the documentation for Solve, under "Possible Issues", you'll see that Solve gives "generic solutions", which means they work for most (but not necessarily all) values of the variables and parameters. For more on this, see "Generic and Non-Generic Cases" at https://reference.wolfram.com/language/tutorial/...

0

Make a plot of the function (Abs value because it is complex): f[x_] = x/(1 + Sqrt[1 - x])^2; Plot[Abs@f[x], {x, -2, 2}, Exclusions -> None] As you can see, the inverse function is multivalued. If you need a single valued function, you must restrict the definition domain. If you define the inverse function as f1: f1[y_] = 4 y/(1 + y)^2; f1[f[x]] // ...

1

This works: f1 = 9*q^2*r0 - q^2*Sqrt[81*r0^2 - 12*q^2] f2 = 9*q^2*r0 + q^2*Sqrt[81*r0^2 - 12*q^2] r2 = (1/144^(1/3))*((f1^(1/3) + f2^(1/3)) + I*Sqrt[3]*(f1^(1/3) - f2^(1/3))) r3 = (1/144^(1/3))*((f1^(1/3) + f2^(1/3)) - I*Sqrt[3]*(f1^(1/3) - f2^(1/3))) a = (2*r2 + r3)/(r2 + 2*r3) b = r2/(2*r2 + r3) \[Phi][r_, r0_, q_] = (1/Sqrt[r2*(r2 + 2*r3)])*2* ...

1

"MapThread" is your friend. Here is your corrected code: d = 3; ag = 6; pg = 6; wp = 10; torootL[al_?NumericQ, t_?NumericQ, zl_?NumericQ, zh_?NumericQ] := al - ((2 zl Sqrt[(1 + t^2 (1 - (zl/zh)^(d + 1))^-1)^-1])/((d + 1) (zl/zh)^(d + 1))) NIntegrate[ x/Sqrt[(1 - x^2) (1 - (((1 + t^2 (1 - (zl/zh)^(d + 1))^-1)^-1) (zl/ ...

2

Clear["Global*"] Restrict the domain to Reals sol = Reduce[19 - 17 Cos[(Pi*t)/8] >= 20, t, Reals] /. C[1] -> n (* n ∈ Integers && (16 n π + 8 ArcCos[-(1/17)])/π <= t <= ( 16 π + 16 n π - 8 ArcCos[-(1/17)])/π *) Table[{n, sol // N}, {n, -2, 2}] // Grid[#, Frame -> All] &

1

Try MapThread[{#1, #2, tz[0.1, #1, #2]} & , {{0.937858, 9.30684, 18.6124,27.9182, 37.2237, 46.5288, 55.8341, 65.1388, 74.4432, 83.7471,93.0506} , {1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100}}] (*{{0.937858, 1, -1.471551293}, {9.30684, 10, -15.50176577}, {18.6124,20, -31.01646875}, {27.9182, 30, -46.52851902}, {37.2237,40, -62.04170567}, {46.5288, 50, -77....

2

First plot what you want to calculate Plot[{19 - 17 Cos[(Pi* t)/8], 20}, {t, -20, 20}, Filling -> {2 -> Top}] then select the area of interest, e.g. Reduce[{19 - 17 Cos[(Pi* t)/8] >= 20, 0 < t < 4 Pi}, t] // N 4.14988 <= t <= 11.8501

1

Specify a range for t to make Reduce work: Reduce[{19 - 17 Cos[Pi t/8] >= 20, 0 < t < 16}, t] (*(8 ArcCos[-(1/17)])/\[Pi] <= t <= (16 \[Pi] - 8 ArcCos[-(1/17)])/\[Pi]*)

2

This question is fundamentally no different than your previous question. Clear["Global*"] f[z_, a_] := 9 + 4 Cos[a - (273 z)/50] - 4 Cos[a - 2 z] - 2 Cos[2 z] - 3 Cos[(173 z)/50] + Cos[4 z] - 2 Cos[(273 z)/50] - 3 Cos[(373 z)/50] - 4 Cos[a + 2 z] + 4 Cos[a + (273 z)/50] - 4 I Sin[a - (273 z)/50] + 4 I Sin[a - 2 z] - 2 I Sin[2 z] - ...

5

Is this what you want?: Clear[X]; Solve[X + Y == 1 , Y] /. X -> {1, 2, 3, 4, 5} (* {{Y -> {0, -1, -2, -3, -4}}} *) Explanation: The first alternative code below is perhaps conceptually the right thing to do, but it's not as simple as the above code. Other alternatives deal with the shortcoming of Plus by modifying Plus, which is potentially ...

0

Doing your Example sir. x = {1, 2, 3, 4, 5} eq[x_, y_] := x + y sol = Table[{x, y /. Flatten[Solve[eq[x, y] == 1]]}, {x, 1, 5, 1}] y -> Last /@ sol or use Directly sol = Table[{y /. Flatten[Solve[eq[x, y] == 1]]}, {x, 1, 5, 1}]

7

When you solved it analytically by Solve, I think you got the warning message: Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. So it is not guaranteed that all the analytic solutions are obtained in this way. (Note that the Lambert W function is multivalued.) As ...

4

Clear["Global*"] f[x_, y_, z_] := 9 E^(373 y/50) - 3 E^(4 y) Cos[(173 x)/50] + E^(173 y/50) Cos[4 x] - 2 E^(2 y) Cos[(273 x)/50] - 3 Cos[(373 x)/50] + 8 E^(2 y) Cos[(273 x)/50] Cos[z] - 2 E^(273 y/50) Cos[2 x] (1 + 4 Cos[z]); g[x_, y_, z_] := -2 E^(273 y/50) (1 + 4 Cos[z]) Sin[2 x] - 3 E^(4 y) Sin[(173 x)/50] + E^(173 y/50) Sin[4 x]...

5

Let's take NMinimize(very robust solver) to solve these two equations s[z_?NumericQ] := {x, y, z} /. NMinimize[ {f[x, y, z]^2 + g[x, y, z]^2,5.66 < x < 2 Pi, -15/100 < y < 0}, {x, y} ][[2]] Function s[z] returns the solution {x[z],y[z],z} Calculate solution for 0<z<Pi xyz = Table[s[z], {z, 0, Pi , Pi/50}]; Graphics3D[{Red, Point[xyz]}, ...

3

Reduce[Power[x, 2] + Power[y, 2] + 1 == Cos[Power[x, 2]*Power[y, 2]], {x, y}, Reals] x==0&&y==0

0

Indeed, you can use SolveAlways to get a solution, if it exists. Hoever, to understand if a solution exists, you can try an approach that requires a few more lines of code and gives a little more insighy on what you are doing. You are dealing with polynomial equation. There is a solution only if you can have all coefficient of the $y$ variable to be equal on ...

3

The following seems to work expr1 = x y^2 + (1 - x) (y - z)^2; expr2 = (y + a)^2 + b; The following is inspired by the documentation for SolveAlways eqn = LogicalExpand[¬ Eliminate[¬ (expr1 == expr2), y]] (* -2 a - 2 z + 2 x z == 0 && -a^2 - b + z^2 - x z^2 == 0 *) Solve[eqn, {a, b}] (* {{a -> (-1 + x) z, b -> x z^2 - x^2 z^2}} *)

7

Using a graphical solution Clear["Global*"] f[x_, y_, z_] := 9 E^(373 y/50) - 3 E^(4 y) Cos[(173 x)/50] + E^(173 y/50) Cos[4 x] - 2 E^(2 y) Cos[(273 x)/50] - 3 Cos[(373 x)/50] + 8 E^(2 y) Cos[(273 x)/50] Cos[z] - 2 E^(273 y/50) Cos[2 x] (1 + 4 Cos[z]); g[x_, y_, z_] := -2 E^(273 y/50) (1 + 4 Cos[z]) Sin[2 x] - 3 E^(4 y) Sin[(173 x)...

1

You could modify how Solve works with subscripts: Unprotect[Solve]; Solve /: Solve[a__] /; !FreeQ[{a}, _Subscript] := Block[{CompressedData}, With[ {z = Unevaluated[Solve[a]] /. s_Subscript :> CompressedData[Compress[s]]}, z /; !MatchQ[z, _Solve] ] ] Protect[Solve]; Then: Solve[A (r - Subscript[r, "+"]) == B, r] {{r -&...

4

Clear["Global*"] Use Format to format output display of variables, e.g., rm and rp Format[rm] = Subscript["r", "-"]; Format[rp] = Subscript["r", "+"]; Solve[A (r - rp) == B, r][[1]]

0

It is not quite clear what are you after. Assuming that you want to get on the screen simultaneously the solutions of the equation 2 with all the values of p from the equation 1, try this Manipulate[ lst1 = Table[ Solve[-10 p - 26 t == 5 && -5.3 p + 19 t == (var1 - 50)], {var1, 10, 30, 4}] /. {{x_, y_}} -> x[[2]] // Quiet; NSolve[{# =...

3

Maybe use ContourPlot3D and ColorFunction for z. ContourPlot3D[ 5 Sin[2 x - y] + 3 Cosh[2 z] - 6 x + 4 Sinh[2 y] Cosh[z - x] + y == 0, {x, 0, 4}, {y, -3, 0}, {z, 0, 2}, MeshFunctions -> {#3 &}, ColorFunction -> Function[{x, y, z}, Hue[z]], ViewProjection -> "Orthographic", ViewPoint -> Top, Axes -> {True, True, False}]

4

SeedRandom[1234]; d = Table[Append[RandomReal[{-1, 1}, {3}], 1], 3]; pl = Cross @@ d; pt = {x, y, z, 1}; eq1 = pl . pt == 0; eq2 = (((# - pt) . (# - pt)) & /@ d); eq = {eq1, eq2[[1]] == eq2[[2]], eq2[[2]] == eq2[[3]]}; Solve is an exact solver and should be given exact input. sol = Solve[eq // Rationalize[#, 0] &, {x, y, z}] // N (* {{x -> 0....

3

Solve without simplification of eq produces an unfinished work, but a correct result. Here are my arguments. Let us execute (BlockRandom guarantees this is reproducible.) d= BlockRandom[Table[Append[RandomReal[{-1, 1}, {3}], 1], 3]]; pl = Cross @@ d;pt = {x, y, z, 1};eq1 = pl . pt == 0; eq2 = (((# - pt) . (# - pt)) & /@ d); eq = {eq1, eq2[[1]] == eq2[[2]]...

4

Well, Solve does not do Simplify on its input automatically. It will not be a good idea for Solve to simplify its input automatically. When you did simplify, the expression changed just enough to make it give the full answer you saw. (may be due to numerical rounding or cancellation and such, since the input is not exact) The warning says this basically ...

1

One way to derive the "known solution" is to substitute the expressions for $X_{1,2}(t)$ into the differential equations for $x_{1,2}$ and solve for the derivatives $\dot{X}_{1,2}$. Then take the real parts of $\dot{X}_{1,2}$, like this: ClearAll["Global*"] x1 = X1[t] Exp[I p1 t]; x2 = X2[t] Exp[I p2 t]; eqns = {D[x1, t] == -I ω1 x1 + ...

4

Clear["Global*"] EDIT: Corrected intervals in Solve sol = Solve[{3 y Cos[y] Cosh[4 x] + (5 + 2 x) Cosh[x] Sin[y] == 0, 3 x Cos[y] Cosh[x] - (5 + 2 x) Cos[y] Sinh[x] == 0, -10 < x < 0, 0 < y < 15}, {x, y}] /. r_Root :> N[r] (* {{x -> -(5/2), y -> π/2}, {x -> -(5/2), y -> (3 π)/2}, {x -> -(5/2), y -> (...

0

The area enclosed by the ellipse is a Disk rgn = Disk[{0, 0}, {Sqrt[3], 2}]; RegionQ[rgn] (* True *) To display the ellipse and the enclosed area Show[ ContourPlot[((x^2)/3) + ((y^2)/4) == 1, {x, -Sqrt[3], Sqrt[3]}, {y, -2, 2}, ContourStyle -> Red] (* ellipse *), RegionPlot[rgn, BoundaryStyle -> None] (* enclosed area *), AspectRatio -> ...

0

Your are dealing with an implicit function. One possibility is to solve it for x, then you get 2 function and you integrate the difference: eq = ((x^2)/alpha^2) + ((y^2)/beta^2) == 1; fun[x_] = y /. Solve[eq, y] For an example, we need some values for alpha and beta: fun1[x_] = fun[x] /. {alpha -> 2, beta -> 1} Plot[fun1[x], {x, -2, 2}] For the ...

1

Five variables are too many for FindInstance, so Table[FindInstance[a*Cos[b x]+c*Cos[d x]^2==0&&x!=0,{x,a,b,d},Reals],{c,0,1}] {{{x -> -(15/2), a -> 0, b -> 171/10, d -> -(103/5)}}, {{x -> -(1/10), a -> -81, b -> 45 \[Pi], d -> -95 \[Pi]}}} As we see, FindInstance tries to find simple solutions as far as it is possible.

2

If you first do the following, you'll get a simpler form of the equation which removes the $\cos^2$ using the double angle formula: eqn = a*Cos[b x ] + c*Cos[d x]^2 == 0; simplerEqn = FullSimplify[TrigReduce[eqn]]; (* c + 2 a Cos[b x] + c Cos[2 d x] == 0 *) Then FindInstance has a better chance at finding solutions without weird Root objects: sols = ...

3

I think due to presence of radicals and denominators it is necessary to use exact (or at least high precision) arithmetic here. y = 1/100; x = 57/1000; n0 = 0; n1 = 1; gE0 = 1/g0 - Sqrt[1 + z^2/(Pi*(2*n0 + 1)*y + 44/10*x*Pi*g0)^2]; gE1 = 1/g1 - Sqrt[1 + z^2/(Pi*(2*n1 + 1)*y + 44/10*x*Pi*g1)^2]; sce0 = 2*Pi*1/ 100*(((2*n0 + 1)* Pi*1/100*(g0 - 1))/((...

0

Using the equations with rationalized constants. The elimination can be simplified by equating the numerators of the LHS of each equation to zero. (xed0 = Eliminate[{ Numerator@Together[sce0 + sce1] == 0, Numerator@Together@gE0 == 0, Numerator@Together@gE1 == 0}, {g0, g1}]) // N (* -1.52351*10^155 z^2 + 5.38366*10^157 z^4 - 7.32016*10^159 z^6 ...

1

Ok, I'm not sure why, but after rationalizing your equations, performing the elimination in sequence seemed to work: y = Rationalize@0.01; x = Rationalize@0.057; n0 = 0; n1 = 1; gE0 = 1/g0 - Sqrt[1 + z^2/(Pi*(2*n0 + 1)*y + Rationalize[4.4]*x*Pi*g0)^2]; gE1 = 1/g1 - Sqrt[1 + z^2/(Pi*(2*n1 + 1)*y + Rationalize[4.4]*x*Pi*g1)^2]; sce0 = 2*Pi*(1/ ...

0

TLDR version of Chris's solution above: Using this equation: CompoundInterest[p_, r_, n_]:=CompoundInterest[p,r,n]= q[n + 1] == (1 + r) q[n] - p The pmt function can be used to find the monthly payments. (*rate: interest rate for loan*) (*nper: total number of payments for the loan.*) (*pv: present value.*) (*fv: The future value, or a cash balance you want ...

Top 50 recent answers are included