Originally Posted by

**Rapha** Good day to you!

I want to solve an IVP in matlab, given by

$\displaystyle x_1 ' (t) = -4*10^{-2} x_1(t) +3*10^7 x_2(t)x_3(t) $

$\displaystyle x_2'(t) = 4*10^{-2}-10^{4}x_2(t)x_3(t) - 3*10^7x_2^2(t)$

$\displaystyle x_3'(t) = 3*10^7 x_2^2(t)$

I tried to write this as a first order vector

$\displaystyle \dot{x} = \begin{pmatrix} -4*10^{-2} & 3*10^7 & 3*10^7 \\ ... & ...&...\\...&...&...\end{pmatrix}*x$

Because of $\displaystyle x_2(t)x_3(t) $ (or because of the first line in the matrix) I think this does not work that way.

Thanks for spending time on my problem/posting.

Kind regards,

Rapha

THis just like the other problem, set up a function with the derivative:

Code:

function dx=deriv(t,x)
dx=zeros(size(x);
dx(1)=-4*10^(-2)* x(1) +3*10^7 *x(2)*x(3);
dx(2)=4*10^(-2)-10^(4)*x(2)*x(3) - 3*10^7*x(2);
dx(3)=3*10^7 *x(2)^2;

CB