How to code second order differential equation with input variable t?

조회 수: 2 (최근 30일)
Hello, how do I implement the following second order differential equation with input variable t (0 to 300) and output the corresponding displacement h? Thank you.
1369.8*h + 2566.7*hdot + 2.785e7*hdotdot - 2091.2*exp(-0.59452*t)*(exp(0.59452*t) + 1.0) = 0

채택된 답변

Mark Rzewnicki
Mark Rzewnicki 2019년 11월 6일
편집: Mark Rzewnicki 2019년 11월 6일
Looks like we have a 2nd-order differential equation of function . To clean the problem up, let's define some constants:
, , , ,
Then we have the following expression:
Now get by itself so we can use a numerical method to integrate the system:
Suppose you define . Then the system is determined for when you specify the initial conditions: .
Notice that .
Let a very small change in t be denoted . Then you could approximate the value of using the relation .
So the process looks like this:
1. Start at and specify the initial conditions and . This allows you to calculate .
2. Use and to determine and h after a tiny step . Now you can calculate .
3. Use and to determine and h after another tiny step . Update the value of .
4. Repeat until .
This process is called "rectangular integration" and it allows you to numerically solve DEs quickly. If you want higher accuracy, you can use a Runge-Kutta method. These methods follow a very similar procedure but reduce the estimation error at every step. A popular one is a fourth-order method commonly called "RK4."
EDIT: I played around simplifying the original equations. Notice that .

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by