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

7 次查看(过去 30 天)
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!!

采纳的回答

John D'Errico
John D'Errico 2024-6-2
编辑:John D'Errico 2024-6-2
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 = 

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Number Theory 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by