to find root of transcendental equation
조회 수: 21 (최근 30일)
이전 댓글 표시
As from below program i need to confirm The roots are α = {2.7859,5.5215,7.9573} . how to find
a=0:0.01:9;
y1=sqrt(64-a.^2);
y2=-1.*a.*cot(a);
plot(a,y1)
grid on
hold on
plot(a, y2)
ylim([0, 12])
댓글 수: 1
Dyuman Joshi
2023년 5월 9일
Numerically you won't be able to find the exact values, more so as the data has 2 digit precision and the values you want to obtain have 4 digit precision.
As you can see below, for tolerance of 0.1 for step-size 0.01, you get 2 out of 3 intersection points -
a=0:0.01:9;
y1=sqrt(64-a.^2);
y2=-1.*a.*cot(a);
a(abs(y1-y2)<0.1)
For step-size 1e-4 and tolerance 1e-3, you get 4 different roots
a=0:0.0001:9;
y1=sqrt(64-a.^2);
y2=-1.*a.*cot(a);
a(abs(y1-y2)<0.001)
Even solve() is unable to find a solution symbolically, and returns a numeric solution via vpasolve. Note that vpasolve only returns a single solution for non-polynomial equations
syms x
assume(x>=0 & x<=9)
f1(x)=sqrt(64-x.^2);
f2(x)=-1.*x.*cot(x);
sol = solve(f1-f2==0, x)
You can call vpasolve() multiple times by setting 'Random' as true to obtain the solutions -
for k=1:5
s = double(vpasolve(f1-f2==0, x, [0 9], 'Random', true))
end
plot(a,y1)
grid on
hold on
plot(a, y2)
ylim([0, 12])
답변 (1개)
Matt J
2023년 5월 9일
As from below program i need to confirm The roots are α = {2.7859,5.5215,7.9573}
If you only need to confirm the roots, just plug them in and check:
dy=@(a) sqrt(64-a.^2) + a.*cot(a);
dy([2.7859,5.5215,7.9573])
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Number Theory에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
