Question: Solving Higher - Order Differential Equations Consider the following equation: d 2 y d t 2 + d y d t = y + 1

Solving Higher-Order Differential Equations
Consider the following equation: d2ydt2+dydt=y+1
It can be reformulated into a system of equations by introducing a new variable z. Let z=dydt It is easy to see that dzdt=d2ydt2. Substituting into original equation we get dzdt+dydt=y+1 which is a first order differential equation.
Effectively we've replaced d2ydt2+dydt=y+1 with the following two equations:
dydt=z and dzdt=y+t-dydt
Create an m -file function to use in the ode45 solver. The function should have two inputs, which are typically called t and y. The variable t is the independent variable, and y is an array of dependent variables.
The range of time is defined as -1 to +1.
Initial conditions are defined as y=0 and z=0
You should have a legend in the southwest corner
You should label your axis
You should have a title on the graph
You can choose any colors or line style
(In matlab)
Solving Higher - Order Differential Equations

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!