Solving second order inhomogeneous differential equations which are not a function of time

4 次查看(过去 30 天)
Hello Community!
Hoes does one solve a 2nd order ode of the form:
y′′+py′+qy=f(x)

采纳的回答

Alan Stevens
Alan Stevens 2021-2-18
Break the ode into two first order ode's.
e.g. dy/dx = v; dv/dx = f(x) - p*v - q*y;
Look up the documentation on ode45
doc ode45
Although the examples use t, for time, as the independent variable, this isn't necessary. You can use x , for distance, say, in its place.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by