How to solve a function with uknown parameter with bisection method

y(x) = (x^3 + p^2x^2 - 10) sin (x) for x=13.61015 y= 13257 p= unknown 5.14<p<11.47

回答 (2 件)

David Hill
David Hill 2022 年 10 月 29 日
x=13.61015;y=13257;
f=@(p)(x^3+p.^(2*x^2)-10)*sin(x)-y;
p=fzero(f,1)
p = 1.0259
P=1.01:.00001:1.03;
plot(P,f(P))%plot shows zero crossing cannot be between 5.14 and 11.47
Torsten
Torsten 2022 年 10 月 29 日
編集済み: Torsten 2022 年 10 月 29 日
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)
p = 
8.3215048459659113138901560210847

2 件のコメント

Nikolas
Nikolas 2022 年 10 月 29 日
with bisception method
Torsten
Torsten 2022 年 10 月 29 日
At least you know now what the result of your bisection method should be :-)

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

質問済み:

2022 年 10 月 29 日

コメント済み:

2022 年 10 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by