How to solve a nonlinear equation?

1 回表示 (過去 30 日間)
CS
CS 2020 年 10 月 20 日
コメント済み: Matt J 2020 年 10 月 21 日
I have an equation as follows
x^(8.5)+3*x^(2)=3000
How can I solve for x?
Thanks for any help!

回答 (1 件)

Matt J
Matt J 2020 年 10 月 20 日
編集済み: Matt J 2020 年 10 月 20 日
[x,fval] = fzero( @(x) x^(8.5)+3*x.^2-3000,nthroot(3000,8.5))
x = 2.5629
fval = 4.5475e-13
  7 件のコメント
CS
CS 2020 年 10 月 21 日
It gives the error
Exiting fzero: aborting search for an interval containing a sign change
because complex function value encountered during search.
(Function value at -0.0282843 is -4.52+3.0076e-36i.)
Check function or try again with a different starting value.
How to solve this?
Matt J
Matt J 2020 年 10 月 21 日
[x,fval] = fzero( @(x) ((1/(3.52*10.^(22)))*abs(x)^(8.14))+(1/207000)*x.^2-4.52,0)
x = -656.6949
fval = -8.8818e-16

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

カテゴリ

Help Center および File ExchangeSystems of Nonlinear Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by