How do I use dsolve to find the solution to u'' + u = 3cos(wt) , u(0) = 0, u'(0) = 0 ?
1 次查看(过去 30 天)
显示 更早的评论
I want to say my problem is me having trouble entering the u'' and the constant w, but I am lost in general as I am fairly new to MatLab.
syms u w t
eqn = diff(diff(u)) + u == 3* cos(w*t)
dsolve(eqn)
0 个评论
回答(1 个)
Walter Roberson
2017-3-24
syms u(t) w
du = diff(u);
eqn = diff(du) + u == 3* cos(w*t)
dsolve(eqn, u(0) == 0, du(0) == 0)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!