Solving differential equations using Matlab

1 view (last 30 days)
Bglover62
Bglover62 on 23 Nov 2015
Answered: Walter Roberson on 24 Nov 2015
Looking to solve the following ODE but have no idea where to start. I have y= 1.1*x + .15*Dx - 1.5*Dy with zero initial conditions at t=0. The following is what I have tried but I keep getting a warning saying that I need to reset the symengine in order to display the result but resetting the symengine doesn't seem to do anything.
>> syms x(t) y(t)
>> dsolve('y = 1.1*x + .15*Dx - 1.5*Dx', 'y(0)=0', 'x(0)=0' )
Thanks for the help

Answers (1)

Walter Roberson
Walter Roberson on 24 Nov 2015
You used Dx twice instead of Dy .
The solution to your system is not unique. The general solution is
x(t) = arbitrary subject to x(0) = 0
y(t) = (int((1/30*(22*x(t)+3*(diff(x(t), t))))*exp((2/3)*t), t)+C1)*exp(-(2/3)*t)
where C1 is a constant of integration needed to provide the y(0) = 0 . The value of it will depend upon x(t) .
You can use any of a number of functions for x(t). For example, x(t) = t^2 is fine, as is x(t) = cos(t) - 1 or x(t) = exp(t) - 1 .

Categories

Find more on Symbolic Math Toolbox 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!