# Tag Info

## New answers tagged equation-solving

1

I guess you could just do the minimization numerically. f[a_, alpha_, b_, beta_, tau_, t1_, t2_] := (2 (3 a^2 + 3 a alpha t1 + alpha^2 t1^2))/t1^3 + (2 (3 b^2 - 3 b beta t2 + beta^2 t2^2))/t2^3 - (1 - t1 - t2) tau fmin[a_, alpha_, b_, beta_, tau_] := NMinValue[{f[a, alpha, b, beta, tau, t1, t2], t1 >= 0 && t2 >= 0 && t1 + ...

2

You can use NestList to apply your function multiple times, but we need to modify your function for that purpose. As a first step, since we are not interested in the value of your function at the minimum, but only in the values of its arguments there, I am going to use NArgMin instead of your N@Minimize combination. We also need to redefine the Dis ...

1

ubpdqn beat me to it and his looks better. You can have no knowledge about the problem at all and still get Mma to get the answer, just use it like Geogebra on steroids. t = SSSTriangle[30, 30, 30]; cent = RegionCentroid[t]; Maximize[y, {x, y} \[Element] Circle[cent, 15]]; big = Circle[cent, 15 + 15 Sqrt[3] - 5 Sqrt[3]]; Graphics[{t, Circle[{0, 0}, 15], ...

5

This is just to illustrate for the first problem (calculation and visualization). Module[{tg = SSSTriangle[30, 30, 30], c, ans}, c = RegionCentroid[tg]; ans = EuclideanDistance[c, tg[[1, 1]]] + 15; Graphics[{Circle[c, ans], LightGray, Disk[#, 15] & /@ tg[[1]], Red, PointSize[0.02], Point[tg[[1]]], EdgeForm[Black], FaceForm[None], Polygon[tg[[...

6

For your 1st problem, assume the following. r is radius of small circles. s is the distance between the center of the large circle and the center of any of small circles. R is the radius of large circle. r == 15 is given; r == s Sin[60 °] and R == r + s by inspection, so With[{r = 15}, Solve[Eliminate[{r == s Sin[60 °], R == r + s}, s], R]][[1,1]] ...

1

To find the exact values for min and max roots roots = DeleteDuplicates@ Flatten[x /. Solve[# == 0, x, Reals] & /@ (Tuples[{-1, 1}, {4}].{1, x, x^2, x^3})] // SortBy[#, N] &; {min, max} = roots[[{1, -1}]] // ToRadicals The approximate numeric values are as shown by @MarcoB {min, max} // N (* {-1.83929, 1.83929} *)

4

Try something like x /. Solve[Sum[RandomChoice[{-1, 1}] x^k, {k, 0, 3}] == 0, x, Reals] instead of your Roots expression. Use NSolve if you want the numerical value of the roots, rather than a symbolic representation. For instance: t = Table[x /. NSolve[Sum[RandomChoice[{-1, 1}] x^k, {k, 0, 3}] == 0, x, Reals], 4500]; realroots = DeleteDuplicates@...

1

This reminds me of NSolve finds real-valued results in version 9, but not in version 10, in which you can use any of the Method settings from Methods for NSolve "EndomorphismMatrix" "CompanionMatrix" "Legacy" "Aberth" "JenkinsTraub" or even a nonexistent method "Foo": NSolve[eqs, {x1, x2, x3, x4}, Reals, Method -> "Foo"] (* {{x1 -> 23.2915, x2 -&...

2

In general one should not expect to obtain a general symbolic solution (a function x[a,b]) to the given equation since there are two independent variables, see e.g. Solve symbolically a transcendental trigonometric equation and plot its solutions for certain aspects regarding transcendental equations. To get an idea how the solution depends on parameters a ...

2

Perhaps this! It works if you only need the plot and not the values, or the function. That would require more work. ContourPlot3D[ Evaluate[-x + (Log[f2[x]] - Log[f1[x]] + Log[b] - Log[a])/((1 - a) + (1 - 1/f1[x]) - (1 - b) + (1 - 1/f2[x]))] , {a, 0, 1}, {b, 0, 1}, {x, 0, 1} , AxesLabel -> {"a", "b", "x"} , Contours -> {0} , Mesh -> None ...

2

Seems to be a case of ill conditioning of the input system. If I redo using exact input and set NSolve to work on high precision then I get a plausible outcome. c1 = 50; c2 = 3/2; c3 = 2/5; c4 = 1/2; c5 = 8; c6 = 16/5; k1 = 37*10^(-17); k2 = 83*10^(-8); k3 = 87*10^(-12); k4 = 32*10^(-6); k5 = 86*10^(-32); eqs = {f1*f2 - k1*x1^2, f1*x3 - k2*x2*x1, f1*(c6 ...

1

In M10, you will get the answer given by Feyre. Solve[c1 && c2 && c3 && c4] {{b1 -> 0.551683 - 0.197769 I, b2 -> 0.163159 - 0.453896 I, b3 -> 0.29314 - 0.549955 I, b4 -> -1.81831*10^-10 + 9.53055*10^-10 I, r1 -> -0.336636 - 0.847225 I, rIm1 -> 0.895327 - 1.06646 I, t1 -> -0.245692 + 0.329425 I, tIm1 -> -...

8

Per @J.M. 's suggestion: gb = GroebnerBasis[{Sqrt[3 y] + Sqrt[x^2 + 2 x] - x - x Sqrt[2 + 9 y^2], y (Sqrt[x y - 2 y^2] + Sqrt[4 y^2 - x y]) - (2 x^2 - 5 x y - y^2)}, {x, y}]; eq = Thread[gb == ConstantArray[0, Length[gb]]]; Solve[eq, {x, y}, Reals] {{x -> 0, y -> 0}, {x -> 1, y -> 1/3}}

0

Please check the documentation on Solve. Under Details: {} means that your system has no solutions in general. Reduce does give a solution, but notice that it comes with the specific condition that λ == 0. For general λ there is no solution. Solve gives generic solutions only. Another excerpt from the documentation: Solve gives generic solutions ...

3

Example Code pts = Solve[y - 2 x^2 + 3/2 == 0 && {x, y} \[Element] Circle[{0, 0}, 1],{x,y}]; parabola = ContourPlot[{y - 2 x^2 + 3/2 == 0}, {x, -1.5, 1.5}, {y, -1.5, 1.5}]; intersections = {Red, PointSize[Medium], Point[{x, y} /. pts]}; Show[{parabola, Graphics[{Circle[{0, 0}, 1], intersections}]}] Output Reference Curve Intersection Show ...

0

I am not sure does the code below produce correct results, but it does provide some numbers reasonably fast. (I guess not because of the negative p, but may be this code is useful anyway...) I made several changes of the code in the question: using NSum instead of Sum; calling NSum (or Sum) once with specification of two ranges; defining a function, BiSum,...

3

If you accept that the general solution can be constructed as an (infinite) Fourier series, $$\sum_{m=-\infty}^{\infty}\phi_m(r) \exp(i m \theta),$$ then you can obtain the expression for $\phi_m(r)$ as follows: eqn = 0 == Simplify@ Laplacian[ Laplacian[ ϕ[r] Exp[I m θ], {r, θ}, "Polar"], {r, θ}, "Polar"]; DSolve[eqn, ϕ, r] (* ==> {{ϕ -> ...

1

The problem with your system of equation is that the "zero" far field solution is unstable, hence extremely sensitive to the initial conditions. Posing the problem as an initial value problem, with the "known" conditions from the successful solution: max = 50; Pr = .72; a = 0.7172594734816521 b = -0.4344414944896132 pohl = NDSolve[{f'''[\[Eta]] + 3 f[\[...

7

The problem is with the default starting initial conditions used by the shooting method in NDSolve. The shooting method is where FindRoot is being used internally, so the OP's error message is a strong hint that this is the problem. Getting convergence in a nonlinear system can depend greatly on the starting conditions. Having luckily solved the system ...

2

It is interesting to see if there are some slightly more general solutions. For example, by assuming that the function has a fixed point for some unknown value c we can do a series expansion to various orders: f[f[x]] == 28 + 9 x Series[%, {x, c, 6}] % //. f[c] -> c LogicalExpand[%] Reduce[%] FullSimplify[%] Solve[%] which gives $\left\{\left\{c\to -\... 1 When I evaluate Roots[ (-2 + x)^3 (-2 + x^2) (-4 + x^3) (4 + 2 x^2 + x^4) (-8 - 8 x - 2 x^2 + x^3 + x^4) == 0, x] // N I get which seems to me to be a reasonable result. So I would recommend restarting Mathematica and trying again. 1 You can take advantage of the ordering of polynomial roots by Root to find the maximum real root. The first root is always the minimum real root, so change the sign of the variable and the result. maxRealRoot[f_] := -Root[f[-#] &, 1] Now make your polynomial a function: poly[x_] = (-2 + x)^3 (-2 + x^2) (-4 + x^3) (4 + 2 x^2 + x^4) (-8 - 8 x - 2 x^2 +... 2 You can try Solve or NSolve sol = x/.NSolve[(-2 + x)^3 (-2 + x^2) (-4 + x^3) (4 + 2 x^2 + x^4) (-8 - 8 x - 2 x^2 + x^3 + x^4) == 0, x] {-1.41421, -1.34768, -0.940763 - 1.33336 I, -0.940763 + 1.33336 I, -0.793701 - 1.37473 I, -0.793701 + 1.37473 I, -0.707107 - 1.22474 I, -0.707107 + 1.22474 I, 0.707107 - 1.22474 I, 0.707107 + 1.22474 ... 7 As the link you provided in your question shows, there is no unique solution. For example (and illustration), assuming a form (linear function) yields 2 solutions: lhs = CoefficientRules[Nest[a # + b &, x, 2], x] rhs = CoefficientRules[28 + 9 x, x] {f1, f2} = a # + b & /. Solve[{({1} /. lhs) == ({1} /. rhs), ({0} /. lhs) == ({0} /. rhs)}, {a, b}... 0 The problem you are feeding Solve has a unique solution and it would be most efficient to solve it once and then feed the result into Manipulate. Solve[ { (p1 a1 + p2/5) (1 + r) + w == p1, (p1/10 + 2 p2/5) (1 + r) + 30 w == p2}, {p1, p2} ] To simplify the code a bit it is proposed that functions representing p1 and p2 should be defined. f1[w_, ... 4 You haven't defined w, so I give it an arbitrary value: w = 1; Manipulate[ sol = {p1, p2} /. Solve[{(p1 a1 + p2 .2) (1 + r) + w 1 == p1, (p1 .1 + p2 .4) (1 + r) + w 30 == p2}, {p1, p2}]; Plot[sol, {r, 0, 045}], {a1, 0, .6} ] 6 Minimize + MinimalBy work on the test case: MinimalBy[Minimize[x /. #, C[1]] & /@ solutions, First] (* {{π/2, {C[1] -> 0}}} *) 2 Maybe something like MinimalSolveSolution[expr_, x_, o___] := MinimalSolveSolution[Solve[expr, x, o]] MinimalSolveSolution[sol:{{x_ -> _}..}] := iMinimalSolveSolution[x /. sol] MinimalSolveSolution[__] =$Failed; iMinimalSolveSolution[l_List] := Min[iMinimalSolveSolution /@ l] iMinimalSolveSolution[ConditionalExpression[val_, cond_]] := ...

0

The following is a general technique, using Solve a = {{-4, 1, 3, 0}, {-2, 7, 1, -1}, {1, -1, 9, -3}, {-1, 0, 5, -10}}; X = Array[x, {4, 4}] sol = Solve[2 a - X + IdentityMatrix[4] == Array[0 &, {4, 4}], Flatten[X]] X /. Flatten[sol] // MatrixForm

0

For such complicated functions you can use FindRoot over a range of your parameters to get an idea. data = Flatten[Table[{10^8 l, 10^8 d, f0 /. FindRoot[l == 6.79018*10^-9/f0 - (2.16138*10^-9 ArcTan[Sqrt[Tan[4.62667*10^8 d f0]^2]])/f0, {f0, 0.5}]} , {l, 2. 10^-8, 50. 10^-8, 10^-8}, {d, 2. 10^-8, 50. 10^-8, 10^-8}], 1]; ListPlot3D[data, AxesLabel -...

2

There seem to be other oddities in this code. TGrad[x, y] /. {x -> pt[1], y -> pt[2]} doesn't make sense to me. You probably meant to use pt[[1]] which is shorthand for Part[pt, 1]. But even this shouldn't be needed as values of x and y should be populated from the destructuring pattern pt : {x_, y_}. More importantly deriv would appear to need a ...

3

First some references that are somewhat related. In all of them the large degree of the polynomials is a factor, in addition to the large coefficients. In this question, only the large coefficients are relevant. This may be a duplicate Q&A: NSolve for high degree univariate polynomials Related: Funny behaviour when plotting a polynomial of high ...

2

The precision of the numbers in the equation is such that near its roots when you change the input value just slightly, rounding errors turn out to have a significant impact. The same happens in this simpler example with a smooth function: Plot[(Cos[1 + h] - Cos[1])/h, {h, 0, 1/100000000}]. You could use exact numbers and solve the equation just once, and ...

3

Updated based on the following formulas provided as additional clarification: Beta = 2 Pi / Lambda = 2 Pi Sqrt[4.88] f / c Z0 = 50 and ZL>>Z0 Solved: Solve[{dvar == 1/((2 Pi)/wL) ArcTan[Sqrt[ZL/50]], lvar == wL/2 - 1/((2 Pi)/wL) ArcTan[(ZL)/Sqrt[ZL 50]]}, {wL, ZL}] {{wL -> 2*(dvar + lvar), ZL -> 50 Tan[(dvar Pi)/(dvar + lvar)]^2}} v = ...

4

Preamble After solving the differential equations it appears that there are five equations with five unknowns (four generated from the two differential equations and the parameter k. However there are only four pieces of information in the five equations so there still is one arbitrary constant. There are many routes that lead to this conclusion, ...

1

You made your question to complicated. It is sufficient to consider the following functional relation $A(\theta)=h$, where $A(\theta)=R(\theta)f(\theta)/g(\theta)$. Now we can solve this equation, i.e. $\theta=A^{-1}(h)$, where $A^{-1}$ denotes the inverse function, $A^{-1}(A(\theta))=\theta$. You are seeking now the series expansion of $\theta(h)$: Series[...

0

Clear[p, a, b, G, H, P, U, S, T] p[A1] = 30; p[A2] = 30; p[B1] = 60; p[B2] = 60; p[A12] = 100; p[B12] = 70; a[l1] = 10; a[h1] = 40; b[l1] = 20; b[h1] = 50; a[l2] = 10; a[h2] = 40; b[l2] = 20; b[h2] = 50; (*all low*) x = a[l1]; y = a[l2]; u = b[l1]; v = b[l2]; Rather than adding conditions to mutiple definitions, use Piecewise (*G[1,x_,y_] is ...

5

First of all you shouldn't (if possible) use approximate numbers working with symbolic functionality like a very sophisticated function Reduce. Before seeking the set of your interest try to envisage the region: RegionPlot[ Abs[1/(1 + I/Sqrt[x + I y])] < 1/2, {x, -1.1, 0.5}, {y, -0.6, 1.0}] Now we can see what we are to find, i.e. ...

1

There may be reasons you elected to write: p[A1] := 30 rather than simply pA1 = 30; and I would think it would be legitimate. However I re-wrote your code using (what to me) seems a simpler format. pA1 = 30; pA2 = 30; pB1 = 60; pB2 = 60; pA12 = 100; B12 = 70; al1 = 10; ah1 = 40; bl1 = 20; bh1 = 50; al2 = 10; ah2 = 40; bl2 = 20; bh2 = 50; x = al1; y =...

4

Here is a short demo. Generate the Dottie number as an exact Root[] object, like so: dottie = x /. First @ Solve[x == Cos[x] && 0 < x < 1, x]; (Tho you might notice an inexact number in the output, rest assured that the resulting Root[] object is an exact number that can be evaluated to arbitrary precision; the number is there only as a sort ...

1

The system is linear and homogeneous in the P's, so has the trivial solution {P1,P2,P3,P4}=0 We can put this into matrix form: eqn = Simplify[{ud == u0d, u0c == u1c, u1b == u2b, u2a == u3a}] m = Transpose@ Table[ Coefficient[#[[1]] - #[[2]], v] & /@ Simplify[eqn] , {v, {P0, P1, P2, P3}}] // Simplify; verify.. Table[ Simplify[ m[[k]].{P0,...

2

You are expecting too much of Reduce in this case, as sigma[ms, ArcTan[0.9], ArcTan[0.1], -2.0, 10, zz, 10] depends on ms in a quite complicated way. Therefore you should not expect Reduce to be able to give a symbolic rule for when the inequality is satisfied. However, we can use numerics to try to find approximate regions where the inequalities hold. ...

0

This gets some answers: FindInstance[{10 > \[Alpha] > 0, 10 > \[Beta] > 0, 10 > \[Gamma] > 0, (Abs[(2 \[Beta])/(\[Beta] + Sqrt[-4 \[Alpha] + (\[Beta] - \[Gamma])^2] + \[Gamma])] + Abs[(4 \[Alpha] - 2 \[Beta] (\[Beta] + Sqrt[-4 \[Alpha] + (\[Beta] - \[Gamma])^2] - \[Gamma]))/(\ \[Beta] + Sqrt[-4 \[Alpha] + (\[Beta] - \[Gamma])^2]...

2

The problem seems to be with the Abs[ ] function. Since you have the sum of two Abs[ ] terms, and since you are only looking for specific examples, you can rewrite your FindInstance as: FindInstance[{-1/2 < (2 \[Beta])/(\[Beta] + Sqrt[-4 \[Alpha] + (\[Beta] - \[Gamma])^2] + \[Gamma]) < 1/2, -1/2 < (4 \[Alpha] - 2 \[Beta] (\[Beta] + ...

0

FunctionDomian and FunctionRange can solve them all! Try: FunctionDomain[Sqrt[2 - x],x] FunctionRange[Sqrt[2 - x],x,y]

1

I can solve the toy problem with NMaximize[{x, Im[Sqrt[2 - x]] == 0}, x]

2

mA = {{1, 2}, {3, 4}}; mC = {{19, 22}, {43, 50}}; mX = Array[X, {2, 2}] Solve[mA.mX == mC, Flatten[mX]] Will do what you want

0

I hope I have understood your question correctly. The problem is that your Bezier curve (blue) does not intersect with the line $y=10$ (red) as you can see from the following plot. fx[t_] := (1 - t)^2 x0 + (1 - t) t x1 + t^2 x2; fy[t_] := (1 - t)^2 y0 + (1 - t) t y1 + t^2 y2; {x0, y1} = {1, 30}; {x1, y1} = {20, 1}; {x2, y2} = {50, 30}; y = 10; Show[{ ...

3

Comment Realize that there is a difference between your original nicely printed equations and the code that you have typed. The difference is in the numerator of the function to be integrated. In the nicely typed set of equations you have Δ in the numerator where as in the code you have typed you have Δ0. Original Code Which is correct? Original ...

1

Now let's try to solve "directly". I know that Solve[g[30, p] == f[p], p] fails: You only have to include ComplexExpand. Now all variables are assumed to be real. f[P_] := 54.758*P^(-0.4)*65^0.2 gnokink[P_] := 0.126191*P^1.1 Solve[f[p] == gnokink[p], p][[1]] {p -> 100.} g[c_, P_] := Piecewise[{{gnokink[P], gnokink[P] < c}, {c, gnokink[P] > c}}...

Top 50 recent answers are included