How can I solve the equation y'' = -H(y) in Matlab where H is the heaviside step function and y(-1) = 0, y'(1) = 0?

9 views (last 30 days)
How can I solve the equation y'' = -H(y) in Matlab where H is the heaviside step function and y(-1) = 0, y'(1) = 0?
If you can help you will have my eternal gratitude!

Answers (1)

Matt J
Matt J on 26 Feb 2015
Edited: Matt J on 26 Feb 2015
I would solve 2 cases
(1) y''=-y %valid where y>0
(2) y''=0 %valid where y<0
and then look retroactively at regions of t where each solution y(t) satisfies y''=-H(y).

Categories

Find more on Numerical Integration and Differential Equations in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!