フィルターのクリア

How to solve differential equation with MATLAB

2 ビュー (過去 30 日間)
nancy
nancy 2015 年 11 月 11 日
回答済み: nancy 2015 年 11 月 13 日
Hi,
I have a problem related to solving differential equation. The equation is:
(3/2)lnX + 3886/x = 19
I can not solve this equation. I must find 'x' value..
How can I solve this with Matlab?
Thanks for your help.
  1 件のコメント
Torsten
Torsten 2015 年 11 月 11 日
X and x are the same ?
Why is your problem related to solving a differential equation ? The equation you wrote is an algebraic equation.
Best wishes
Torsten.

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

採用された回答

nancy
nancy 2015 年 11 月 12 日
Hi Torsten,
Actually I have understood the first equation and x is nearly 372000 derived. But it is a very high value and I can say it is not logical for my solution.
When I try an arbitrary value as nearly 375, the solution can be acceptable for me. 375 may be more logical for me.
That is to say; can there be a second answer of this equation?
Best regards,
  1 件のコメント
Torsten
Torsten 2015 年 11 月 12 日
MATHEMATICA finds two solutions:
Use MATLAB's "fzero" to get the smaller solution:
f=@(x)1.5*log(x)+3886/x-19;
x0=[300 400];
sol=fzero(f,x0)
Best wishes
Torsten.

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

その他の回答 (5 件)

nancy
nancy 2015 年 11 月 11 日
Sorry.. You are right.. It is an algebraic equation, I wrote false..
And x and X are the same. I mean it is:
(3/2)lnX + 3886/X = 19
You can take care above equation.
Could you please help me and give me a clue to solve that?
Thanks for your help..

Torsten
Torsten 2015 年 11 月 11 日
Does this work ?
syms x
eqn = 1.5*log(x)+3886/x-19 == 0;
sol = solve(eqn,x);
The result should be some expression containing the Lambert-W-function.
Best wishes
Torsten.

nancy
nancy 2015 年 11 月 12 日
Hi,
When I operate the above code, it gives an answer just like this:
sol =
exp(38/3)*exp(wrightOmega(pi*i + log(7772/3) - 38/3))
So, it doesn't give an exact solution..
What can I do at this step? I must find the X value as numerical.
  1 件のコメント
Torsten
Torsten 2015 年 11 月 12 日
Does this work ?
syms x
eqn = 1.5*log(x)+3886/x-19 == 0;
sol = solve(eqn,x);
solnum = eval(sol);
disp(solnum)
Best wishes
Torsten.

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


nancy
nancy 2015 年 11 月 12 日
Hi Torsten,
Actually I have understood the first equation and x is nearly 372000 derived. But it is a very high value and I can say it is not logical for my solution.
When I try an arbitrary value as nearly 375, the solution can be acceptable for me. 375 may be more logical for me.
That is to say; can there be a second answer of this equation?
Best regards,

nancy
nancy 2015 年 11 月 13 日
Thank you very much for your helps.. It is ok.
Best wishes,

カテゴリ

Help Center および File ExchangeNumeric Solvers についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by