Need help with this problem

Second-Order ODE with Initial Conditions
Solve this second-order differential equation with two initial conditions.
OR = 0
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
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 件)

カテゴリ

製品

リリース

R2022a

タグ

質問済み:

2022 年 5 月 8 日

コメント済み:

2022 年 5 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by