Need help with this problem
显示 更早的评论
Second-Order ODE with Initial Conditions
Solve this second-order differential equation with two initial conditions.
Initial Conditioins:
Define the equation and conditions. The second initial condition involves the first derivative of y. Represent the derivative by creating the symbolic function Dy = diff(y) and then define the condition using Dy(0)==0.
Script
syms y(x)
Dy = diff( );
ode = diff(y,x,2) == cos( ;
cond1 = y(0) == ;
cond2 = Dy(0) == ;
conds = [cond1 ];
ySol(x) = dsolve( ,conds);
ht = matlabFunction(ySol);
fplot(ht,'*')
1 个评论
Dyuman Joshi
2022-5-9
This seems like a homework problem. What have you done? This seems easy as well. Look, compare and fill in the blanks.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!