please give me answer what is wrong
1 次查看(过去 30 天)
显示 更早的评论
采纳的回答
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)
cond = y(0) == 0;
ySolx = dsolve(eqn,cond)
[VF,Subs] = odeToVectorField(eqn)
eqnfcn = matlabFunction(VF, 'Vars',{x,Y})
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.
.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!