Best numerical method to integrate a differential equation like $\frac{\partial y}{\partial t}=f\left(t,\frac{\partial y}{\partial r}\right)$?

What is the best numerical method to solve an equation like this: $$\frac{\partial y}{\partial t}=f\left(t,\frac{\partial y}{\partial r}\right)\quad?$$

Can somebody give, at least, a reference?

-
Any numerical analysis book should have a section on partial differential equations. Usually you have written $y$ as a function of $t,r$ and you will have to add something about $\frac{\partial y}{\partial r}$ to get a solution. – Ross Millikan Sep 23 '11 at 22:56

This is quite difficult to answer without further details. Assuming that you have no clue about what to do, I would recommend you to look into finite difference methods. These are probably the easiest methods to understand. Other methods are finite elements (bit more complicated and in 1d often similar to finite differences, though boundary conditions are handled differently) and (pseudo)spectral methods (which may give you better accuracy if everything is smooth).

A good reference is Morton & Mayers, Numerical solutions of partial difference methods (though as Ross says, any numerical analysis book will have something about this, often in the last chapter). There is also a list of links at http://math.fullerton.edu/mathews/n2003/finitediffpde/FiniteDifferencePDEBib/Links/FiniteDifferencePDEBib_lnk_1.html .

-

I don't think we need numerical method to solve $\dfrac{\partial y}{\partial t}=f\left(t,\dfrac{\partial y}{\partial r}\right)$ .

Firstly, because EqWorld has already provided the complete integral of this type of PDE, see http://eqworld.ipmnet.ru/en/solutions/fpde/fpde3305.pdf for details:

$$y(r,t)=\int f(t,c_1)\,dt+c_1r+c_2$$

Secondly, for the general solution:

$\dfrac{\partial y}{\partial t}=f\left(t,\dfrac{\partial y}{\partial r}\right)$

$\dfrac{\partial^2y}{\partial r\partial t}=\dfrac{\partial f\left(t,\dfrac{\partial y}{\partial r}\right)}{\partial r}$

$\dfrac{\partial^2y}{\partial r\partial t}=\dfrac{\partial f\left(t,\dfrac{\partial y}{\partial r}\right)}{\partial\dfrac{\partial y}{\partial r}}\dfrac{\partial\dfrac{\partial y}{\partial r}}{\partial r}$

$\dfrac{\partial^2y}{\partial r\partial t}=\dfrac{\partial f\left(t,\dfrac{\partial y}{\partial r}\right)}{\partial\dfrac{\partial y}{\partial r}}\dfrac{\partial^2y}{\partial r^2}$

Let $u=\dfrac{\partial y}{\partial r}$ ,

Then $\dfrac{\partial u}{\partial t}=\dfrac{\partial f(t,u)}{\partial u}\dfrac{\partial u}{\partial r}$

$\dfrac{dt}{ds}=1$ , letting $t(0)=0$ , we have $t=s$
$\dfrac{du}{ds}=0$ , letting $u(0)=u_0$ , we have $u=u_0$
$\dfrac{dr}{ds}=-\dfrac{\partial f(t,u)}{\partial u}=-\dfrac{\partial f(s,u)}{\partial u}(u=u_0)$ , we have $r=F(u_0)-\int^s\dfrac{\partial f(s,u)}{\partial u}(u=u_0)~ds=F(u)-\int^t\dfrac{\partial f(s,u)}{\partial u}ds$
It's bad style to only state "the answer is there" - what if that link goes stale? – Tobias Kienzler Mar 12 '13 at 7:56
This is only a solution for the initial value problem $y(r,t_0) = c_1r + c_2$, not for the general case $y(r,t_0) = y_0(r)$ – Tobias Kienzler Mar 12 '13 at 7:57