How to solve a function with uknown parameter with bisection method
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
y(x) = (x^3 + p^2x^2 - 10) sin (x) for x=13.61015 y= 13257 p= unknown 5.14<p<11.47
0 Kommentare
Antworten (2)
David Hill
am 29 Okt. 2022
x=13.61015;y=13257;
f=@(p)(x^3+p.^(2*x^2)-10)*sin(x)-y;
p=fzero(f,1)
P=1.01:.00001:1.03;
plot(P,f(P))%plot shows zero crossing cannot be between 5.14 and 11.47
0 Kommentare
Torsten
am 29 Okt. 2022
Bearbeitet: Torsten
am 29 Okt. 2022
syms x y p
eqn = y - (x^3 + p^2*x^2 - 10)*sin(x) == 0;
eqn = subs(eqn,[x y],[13.61015,13257]);
p = vpasolve(eqn,p);
p = p(p>5.14 & p<11.47)
2 Kommentare
Torsten
am 29 Okt. 2022
At least you know now what the result of your bisection method should be :-)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!