Effacer les filtres
Effacer les filtres

How to calculate real roots of a polynomial equation under square root ?

7 vues (au cours des 30 derniers jours)
Aman
Aman le 2 Juin 2024
Commenté : Aman le 2 Juin 2024
syms t
coupler_parametric=[5163136522924301/2251799813685248,...
2^(1/2)/2 - (8*t)/(t^2 + 1), - (4*(t^2 - 1))/(t^2 + 1) - 2];
norm(coupler_parametric)
%upto this step ,i have calculated norm, if t can be any real number
%further i want to calculate real roots of equation given below,
eq= norm(coupler_parametric)-3.5;
%please help someone
%thanks!!
  2 commentaires
John D'Errico
John D'Errico le 2 Juin 2024
@Aman You don't need to ask this question a third time. You have now gotten answers both times you asked.
Aman
Aman le 2 Juin 2024
@John D'Errico sorry sir,i am not asking same question twice.I was just clarifying my doubt

Connectez-vous pour commenter.

Réponse acceptée

John D'Errico
John D'Errico le 2 Juin 2024
Modifié(e) : John D'Errico le 2 Juin 2024
syms t real
coupler_parametric=[5163136522924301/2251799813685248,...
2^(1/2)/2 - (8*t)/(t^2 + 1), - (4*(t^2 - 1))/(t^2 + 1) - 2]
coupler_parametric = 
f = matlabFunction(norm(coupler_parametric));
fplot(f)
Now, it appears you want to solve for the solutions of f(t)=4.5, or any specific value.
I would point out it is entirely possible there will be no algebraic solution exists for that problem. But perhaps we can look more closely. What is the norm? Simply the square root of the sum of squares. We can write the square of that norm simply enough for any value. I'll leave it in symbolic form to start...
syms targetvalue % it might be 3.5 ...
normsq = expand(sum(coupler_parametric.^2) - targetvalue^2)
normsq = 
As you can see, this is a rational polynomial in t. We can turn it into a regular polynomial in t, by multiplying by (t^2+1)^2. This is always legal, since t is real, and therefore t^2+1 will never be zero.
normpoly = simplify(normsq*(t^2+1)^2)
normpoly = 
vpa(expand(normpoly),4)
ans = 
So as it turns out, your problem reduces to a degree 4 polynomial in t. A solution will always exist. Actually, 4 solutions will exist, but they need not be real. Since you wanted real solutions, this will do it.
tsolve = solve(normpoly,t,'maxdegree',4,'returnconditions',true)
tsolve = struct with fields:
t: [2x1 sym] parameters: [1x0 sym] conditions: [2x1 sym]
It appears from the plot that no real solution will exist if the targetvalue is less than around 3, nor does it look like a real solution exists if the targetvalue is too large too. And that will get factored into the conditions.
vpa(subs(tsolve.t,targetvalue,3.5))
ans = 
  1 commentaire
Aman
Aman le 2 Juin 2024
Thank you very much sir,I can't say in words how much it has helped me.
Again thanks!!

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by