MATLAB Answers

solutions via vpasolve of an irradical equation

51 views (last 30 days)
S = vpasolve(x^(6/4) - x^2 == 3, x)
S = 0.77136987720146542405968841240509 + 2.1125592027732234578638207589021i
>> S = vpasolve(x^4 - x^3 +6*x^2 +9 == 0, x)
S= - 0.27136987720146542405968841240509 - 1.3060423854087985932930685734426i
- 0.27136987720146542405968841240509 + 1.3060423854087985932930685734426i
0.77136987720146542405968841240509 + 2.1125592027732234578638207589021i
0.77136987720146542405968841240509 - 2.1125592027732234578638207589021i
When I apply VPASOLVE on irradical equation i get only one solution. And when i Removed radical by squaring it, it turned in to polynomial and giving me 4 roots, out of which one root is same as that of original irradical equation.
Why vpasolve of irradical equation result in to one solution? It may be possible that a given irradical equation can contain more that one solution.
And if There are more than two solutions of irradical equation then how to verify (via some command) which roots of polynomial will satisfy original irradical equation?
And is there any way to matlab to remove radicals and change the irradical equation in to polynomial.

  2 Comments

John D'Errico
John D'Errico on 1 Jan 2021
Sigh, PLEASE STOP POSTING duplicate questions. This is not any different from the last one you posted and got an answer to.
Himanshu SINGLA
Himanshu SINGLA on 4 Jan 2021
In that question,actually there were no irradicals in equation. As i mistakenely square the terms in matrix .

Sign in to comment.

Accepted Answer

John D'Errico
John D'Errico on 1 Jan 2021
Edited: John D'Errico on 1 Jan 2021
vpasolve is a NUMERICAL solver in general. As such, it can generate only one solution to a general nonlinear equation. That solution will be based on where it starts looking.
However, with true polynomials, it can do better. for a polynomial with non-negative integer exponents, vpasolve will find all of the roots. Once you introduce polynomial-like forms but with non-integer exponents, everything goes out the window, and vpasolve is reduced to being only able to find ONE root, based on the starting value it used.
Sorry. While it may LOOK vaguely like a polynomial, once you have fractional exponents in there, things are no longer so easy.
Your final question is if there is any way in MATLAB to remove those fractional exponents. An issue is that sometimes, such a transformation of a problem can introduce spurious solutions that were not solutions to the original problem. So at the very least, you need to verify if that has happened, and discard any garbage that has crept into the solution.
For simple square roots, we can do this.
syms x y
F0 = x^(6/4) - x^2 == 3;
F1 = simplify(subs(F0,x,y^2),'ignoreanalyticconstraints',true)
F1 =
y^4 + 3 == y^3
Now, we can solve them both using vpasolve.
vpasolve(F0)
ans =
0.77136987720146542405968841240509 + 2.1125592027732234578638207589021i
x1sol = vpasolve(F1).^2
x1sol =
- 0.27136987720146542405968841240509 - 1.3060423854087985932930685734426i
- 0.27136987720146542405968841240509 + 1.3060423854087985932930685734426i
0.77136987720146542405968841240509 + 2.1125592027732234578638207589021i
0.77136987720146542405968841240509 - 2.1125592027732234578638207589021i
And we see that ONE of those roots does match what vpasolve found for F0. Are they all true solutions to the original problem?
subs(F0,x,x1sol)
ans =
0.26421020446393276194223113955307 - 1.4176822469931786079840946486996i == 3
0.26421020446393276194223113955307 + 1.4176822469931786079840946486996i == 3
3.0 - 7.346839692639296924804603357639e-40i == 3
3.0 + 7.346839692639296924804603357639e-40i == 3
So indeed, the transformation found 4 roots, two of which are not apparently solutions at all. How interesting. Oh. Yeah. I said that might happen.
Of course, things get exceedingly nasty if the fractional exponents are not simple things. Thus if your original problem had been
F2 = x^3.123456789 - x^2 + x == 3
then it gets more difficult yet. While it may look like a simple polynomial, it is not really so.

  1 Comment

Himanshu SINGLA
Himanshu SINGLA on 4 Jan 2021
Okay, Thankyou so much.
In my problem, I have an equation (result of 5 by 5 matrix) containing irradicals. I manually squared it four timesand removed all irradicals like in above example.
But while running the program, some terms exceed more than 25000 characters and program get stuck.
how to deal with this?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!