please give me answer what is wrong

1 回表示 (過去 30 日間)
현국 조
현국 조 2021 年 10 月 21 日
コメント済み: Star Strider 2021 年 10 月 21 日
  1 件のコメント
현국 조
현국 조 2021 年 10 月 21 日

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

採用された回答

Star Strider
Star Strider 2021 年 10 月 21 日
The differential equaton apparently does not have an analytic solution.
Integrating it numerically is an option —
syms y(x) x Y
Dy = diff(y);
eqn = (x*exp(x)+y+exp(y)+3)*diff(x) + (x*exp(y)+x+2)*Dy == 0;
isoeqn = isolate(eqn,Dy)
isoeqn = 
cond = y(0) == 0;
ySolx = dsolve(eqn,cond)
Warning: Unable to find symbolic solution.
ySolx = [ empty sym ]
[VF,Subs] = odeToVectorField(eqn)
VF = 
Subs = 
eqnfcn = matlabFunction(VF, 'Vars',{x,Y})
eqnfcn = function_handle with value:
@(x,Y)[-(exp(Y(1))+x.*exp(x)+Y(1)+3.0)./(x+x.*exp(Y(1))+2.0)]
tspan = [0 2.5];
ic = 0;
[x,y] = ode45(eqnfcn, tspan, ic);
figure
plot(x, y)
grid
xlabel('x')
ylabel('y')
legend(string(Subs), 'Location','best')
Experiment to get different results.
.
  2 件のコメント
현국 조
현국 조 2021 年 10 月 21 日
really thanks
Star Strider
Star Strider 2021 年 10 月 21 日
As always, my pleasure!
.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by