Solve equation x^(0.7)-x^(-0.3)==1 get wrong answer??

1 view (last 30 days)
I try to solve the following equation:
syms x
solve (x^0.7-x^(-0.3)==1,x)
ans =
2.2806043918081745336771958436901
0.301860807970099685692066514691
But the second root is wrong..... the right side is -1 instead of 1.
What's happening ?

Answers (1)

Roger Stafford
Roger Stafford on 7 Feb 2015
I think I can account for the extraneous "solution" you received. If you substitute x^(0.1) = y, which can be expressed as x = y^10, the corresponding equation in y becomes
y^7-1/y^3 = 1
and multiplying by y^3 and transposing gives
y^10-y^3-1 = 0
Matlab's 'roots' gives ten roots for this equation, but only two of them are real-valued. One of the latter is
y = -0.88711653267660
which would correspond to
x = y^10 = +.30186080797010
Unfortunately, this is not a solution to the original equation in x, since the equations in x and y are not perfectly equivalent.
Thus, you have caught matlab's 'solve' in an error. It is a mistake that 'aolve' is likely to make when faced with an equation involving fractional-valued powers of the unknown.
Lesson to be learned: You should always check the solutions that 'solve' offers. Some of them may not actually be valid solutions.
  1 Comment
John D'Errico
John D'Errico on 7 Feb 2015
Note that vpasolve returns only the one root, although it can find multiple roots when they are there to be found.

Sign in to comment.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!