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

조회 수: 2 (최근 30일)
Aman
Aman 2024년 6월 2일
댓글: Aman 2024년 6월 2일
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
John D'Errico
John D'Errico 2024년 6월 2일
@Aman You don't need to ask this question a third time. You have now gotten answers both times you asked.
Aman
Aman 2024년 6월 2일
@John D'Errico sorry sir,i am not asking same question twice.I was just clarifying my doubt

댓글을 달려면 로그인하십시오.

채택된 답변

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 = 
  댓글 수: 1
Aman
Aman 2024년 6월 2일
Thank you very much sir,I can't say in words how much it has helped me.
Again thanks!!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Polynomials에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by