I am trying to solve the following equation
Solve[x ϵ + (-ϵ) x^-ϵ - c (-ϵ) x^(-ϵ - 1) == 0, x]
Yields
Solve::nsmet: This system cannot be solved with the methods available to Solve. >>
What can I do to solve this equation?
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityIn short: There is no closed solution, but you can get solutions for specific values of ϵ
.
Detailed explanation:
First, we can transform your equation into a more compact form by using FullSimplify
(and replacing ϵ
with e
for less typing within Mathematica):
eq = (x ϵ + (-ϵ) x^-ϵ - c (-ϵ) x^(-ϵ - 1) /. ϵ -> e //FullSimplify) == 0
(* e x^(-1 - e) (c - x + x^(2 + e)) == 0 *)
Now we continue by evaluating both factor components separately: First the easy one (e x^(-1 - e) == 0
) using Reduce
, giving us the conditions for x
and e
, under which this part becomes 0:
Reduce[e x^(-1 - e) == 0, x]
(* (x != 0 && e == 0) || (Re[e] < -1 && x == 0) *)
Then to the second part c - x + x^(2 + e) == 0
: This one already looks odd, since it comprises a polynom of degree varying with e
, but why not try our luck with Reduce
again? So:
Reduce[c - x + x^(2 + e) == 0, x]
(* Reduce::nsmet: This system cannot be solved with the methods available to Reduce. >> *)
Ah - bad luck! But why is that?
As a polyom's number of roots, which we are looking after by trying to solve for ==0
, depends on the polynom's degree, there will be no closed solution, as the degree depends on e
here.
How can this be proofed with Mathematica? E.g. by solving for some given values for e
and counting the number of solutions for each specific value of e
(i.e. the number of roots for each e
):
Length /@ Table[Solve[c - x + x^(2 + e) == 0, x], {e, 1, 20}]
(* {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22} *)
As anticipated, the number of roots equals the polynom's degree, which is 2+e
. Therefore, there will be no closed solution - even with e
limited to the domain of positive integers.
In essence, your equation requires solving arbitrary-degree polynomials.
You therefore will need to solve for specific values for e
to get results, e.g. by using the Table-method I outlined above.
Even then, starting from e==3
, this involves solving a quintic (and higher) polynom(s), so Mathematica will give you solutions based on the generic Root
builtin, meaning you will only be able to get numeric results for specific c
and e
.
In this case, I recommend Manipulate to investigate the function. Note as x, c and ϵ are used. With the information found You can start better studies
Manipulate[
Plot[x ϵ + c x^(-1 - ϵ) ϵ - x^-ϵ ϵ
, {x, -6., 6.}]
, {c, -6., 6.}
, {ϵ, -6, 6}]
For given numeric values of ϵ
and c
you can use FindRoot
:
eq = x ϵ + (-ϵ) x^-ϵ - c (-ϵ) x^(-ϵ - 1) == 0;
FindRoot[eq /. {c -> 2, ϵ -> 3/4}, {x, 1}]
(* {x -> 1.38718} *)
For arbitrary analitycal values of ϵ
and c
the equation seems to be unsolvable. However, if you can threat ϵ
as a small parameter (like in perturbation theory), I would suggest to find the solution as power series w.r.t. ϵ
:
n = 2; (* number of terms in expansion *)
coeffs = Table[a[i], {i, 0, n - 1}];
rule = x -> coeffs.Table[ϵ^i, {i, 0, n - 1}] + O[ϵ]^n
Reduce[Thread[List @@ Normal[eq /. rule][[1]] == 0], {a[0], a[1], a[2]}]
As the result we have expressions for the first n
series coeffients a[i]
.
First (for a given Epsilon):
eq = x ϵ + (-ϵ) x^-ϵ - c (-ϵ) x^(-ϵ - 1) == 0
then:
FullSimplify @ eq
Thus it suffices to solve:
c - x + x^(2 + ϵ) == 0
Then
sol = Solve[(c - x + x^(2 + ϵ)) == 0, x]
delivers the solutions. If you want the solutions for e.g.,c = 5, then
c = 5; x /. sol
will show them.
When Epsilon is is not given, Solve is not able to find the solutions.
Solve
-line still leads to the same error message: "This system cannot be solved with the methods available to Solve." Would you mind putting the actual solutions you got into the answer?
$\endgroup$
. So one solution is (\[Epsilon]>0) x=0, the others one gets solving
c - x + x^(2 + [Epsilon])==0`, which gives the result(s).
$\endgroup$
c-x+x^(2+\[Epsilon])==0
is exactly the part, which is not solvable with all Mathematica-versions tested so far (see comments above)! If you managed to get a solution, please post it in your answer. Otherwise, please revise your answer.
$\endgroup$
The new in M12 function AsymptoticSolve
can be used to find the perturbation expansions. First, simplify your equation:
eqn = x ϵ+(-ϵ) x^-ϵ-c (-ϵ) x^(-ϵ-1) == 0;
FullSimplify[eqn]
x^(-1 - ϵ) (c - x + x^(2 + ϵ)) ϵ == 0
So, assuming $x\neq 0$ and $\epsilon \neq 0$, we have:
seqn = FullSimplify[eqn, x != 0 && ϵ != 0]
c + x^(2 + ϵ) == x
The solution for x
when ϵ
is 0 can be found from:
roots = Values @ Solve[seqn /. ϵ -> 0, x]
{{1/2 (1 - Sqrt[1 - 4 c])}, {1/2 (1 + Sqrt[1 - 4 c])}}
Choosing the first root and using AsymptoticSolve
:
AsymptoticSolve[seqn, {x, roots[[1]]}, {ϵ, 0, 1}]
{{x -> 1/2 (1 - Sqrt[1 - 4 c]) + (1/( 2 Sqrt[1 - 4 c]))ϵ (-Log[2] + Sqrt[1 - 4 c] Log[2] + 2 c Log[2] + Log[1 - Sqrt[1 - 4 c]] - Sqrt[1 - 4 c] Log[1 - Sqrt[1 - 4 c]] - 2 c Log[1 - Sqrt[1 - 4 c]])}}
ϵ
you could useFindRoot
. $\endgroup$x
. thit is the simplyfiyed equationc + x^(2 + \[Epsilon]) == x
$\endgroup$