1
$\begingroup$

I am trying to solve three equations which are of the form shown below numerically:

$\frac{\partial v}{\partial t}=f(v,y)$

$\frac{\partial}{\partial t}\left(vy\right)=f(v,y,z)$

$\frac{\partial}{\partial t}\left(vy^{2}\right)+\frac{\partial}{\partial t}\left(z\right)=f(v,y,z)$

where $v$, $y$ and $z$ are all functions of time ($t$) and space ($x$).

I know the initial values of the variables. I am desperate to know which numerical method to use to solve them. I was thinking of explicit Euler but I think that would not be possible due to the non-linearity cause by the $y^2$ term. I will be coding in Matlab. Would I need to linearize the equation and how?

Thanks very much.

1 Answers 1

2

I will use $v'$, $y'$, $z'$ for the derivatives with respect to time, and $f$ for $f(v,y,z)$. We would like to reformulate this system to give us explicit expressions for these derivatives.

The first equation remains unchanged: $v' = f.$

Apply the product rule in the second equation and eliminate the $v'$ term using the first equation and rearrange terms: $y' = \frac{f}{v} - \frac{fy}{v}.$

Apply the product rule in the third equation, eliminate $v'$, $y'$ using the first two equations and rearrange: $z' = -f -fy^2 +2f^2y.$

These equations can now be solved by one of many methods. Explicit Euler is a poor choice; it has stability issues and large error. I suggest using one of MatLab's built in solvers. You can find the details of the implementation on their website.

  • 0
    I didn't ask you to explain the entire field of numerical analysis or in fact the predictor-corrector method, I was hoping for sth like 'yes this method can be used in such cases because ...'. Thanks anyways. I will check out the book and the link. Tanx.2012-05-15