How to solve some "tricky" differential equations

I'm a Mathematica user who is starting to learn MATLAB. My professor told me that if I want to do something serious, nothing is better than MATLAB. So, I have several DEs problems to solve.
First problem:
In Mathematica, I use this code for the solution of above equation
Second problem:
The Mathematica code
Third problem:
The code
I have consulted to MATLAB documentations how to solve above differential equations but I couldn't find the answer. Any help would be appreciated. Thank you.

Answers (1)

It should be possible to solve the first problem with MATLAB's "dsolve". Otherwise, rewrite you 3rd order ODE as a system of three first-order ODEs
y1'=y2
y2'=y3
y3'=y1+1
and use ODE45 to solve.
For the second and third problem, use DDE23.
Best wishes
Torsten.

2 Comments

In the first problem, I am having trouble to put the initial conditions into the codes. All the examples I know using "trivial" conditions, e.g. y(0)=0, y'(0)=1, y''(0)=2, ...
In the second and third problems, I have difficulties with the non-identical delays. In the second problem: x(t-2) and x(t-3), and in the third problem: x(t-1) and x(t-2).
Instead of some hints, could you please post complete codes to solve one of the above problems?
Using dsolve, you should have no trouble to insert boundary conditions at three different points. Using a numerical solver, try BVP4C and look at the example "threebvp".
For the second and third problem: DDE23 deals with non-identical (constant) delays.
Invest a little time - nothing is for free.
Best wishes
Torsten.

Sign in to comment.

Categories

Find more on Programming in Help Center and File Exchange

Products

Asked:

on 21 Jun 2015

Commented:

on 22 Jun 2015

Community Treasure Hunt

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

Start Hunting!