4
$\begingroup$

I am trying to render the solution of the following partial differential equation:

$$ u = u(x,y)~;\quad \frac1{x^{2/3}}\partial_xu + x^3\partial_yu + \partial_y^2u + \partial_x^3u = 0 $$

However, the kernel seems to not produce anything. I checked documentation for different ways of inputting in the equation, but nothing helps. I even tried the sample problems directly from the documentation and those still had no explicit solution. I also quit the local kernel and repeated the process twice. I used something of the following:

eqn2 = D[u[x, y], {x, 3}] + D[u[x, y], {y, 2}] + x^3 D[u[x, y], y] + 
1/x^(2/3) D[u[x, y], {x, 1}] == 0;

DSolve[eqn2, u, {x, y}]

Any ideas of what is going on?

$\endgroup$
3
  • 1
    $\begingroup$ The solution of your PDE can not be determined without boundary conditions. You should specify them. $\endgroup$
    – faleichik
    Commented Feb 11, 2012 at 8:30
  • 4
    $\begingroup$ I would be surprised if this can be solved by Mathematica with DSolve. Do you need an analytic solution or would it be enough if you have it numerically solved? $\endgroup$
    – halirutan
    Commented Feb 11, 2012 at 8:41
  • $\begingroup$ Yeah, it is rare that a PDE admits an analytical solution. Did you check handbooks for this particular PDE? $\endgroup$ Commented Feb 11, 2012 at 9:22

1 Answer 1

8
$\begingroup$

As far as I know Mathematica can only solve very special cases of partial differential equations exactly. However, since you want to render the solution, a numerical solution will be enough. Here's an example using the heat equation as a placeholder:

(* Differential equation *)
eqn = D[u[x, t], t] - D[u[x, t], x, x];
(* Boundary/Initial conditions:
   Absorbing boundaries, Gaussian bump *)
ic = {
    u[x, 0] == Exp[-x^2/2],
    u[-10, t] == u[10, t] == Exp[-10^2/2]
};
(* Unleash the fury *)
s = NDSolve[{eqn == 0}~Join~ic, u, {x, -10, 10}, {t, 0, 20}];
(* Visualize result *)
Plot3D[Evaluate[u[x, t] /. s], {x, -10, 10}, {t, 0, 20}]

enter image description here

NDSolve does not care about the type of differential equation, so your variable coefficients aren't a problem (modulo numerical instabilities of course). Replace eqn by your equation and add according initial conditions and you'll be fine. Here's an example of the same equation, only that now the diffusion constant is not $1$ but $e^{-t/3}$, making diffusion disappear over a time scale of $3$:

eqn = D[u[x, t], t] - E^(-t/3) D[u[x, t], x, x];
ic = {
    u[x, 0] == Exp[-x^2/2],
        u[-10, t] == u[10, t] == Exp[-10^2/2]
    };
s = NDSolve[{eqn == 0}~Join~ic, u, {x, -10, 10}, {t, 0, 20}];
Plot3D[Evaluate[u[x, t] /. s], {x, -10, 10}, {t, 0, 20}, AxesLabel -> Automatic, MaxRecursion -> 8, PlotPoints -> 32]

enter image description here

$\endgroup$
6
  • $\begingroup$ Thanks. I was hoping on a analytic solution I guess. What I was really trying to do is check my solution that I obtained by hand. I guess I could equate things and check it with the numerical value given by NDSolve. $\endgroup$
    – night owl
    Commented Feb 11, 2012 at 11:28
  • 1
    $\begingroup$ Just take the wave equation as an example, which is a really easy PDE: $u_{xx}-u_{tt}=0$. It has either a useless solution, $u=\phi(x-t)+\phi(x+t)$, or one that is already too long for this comment if you want to incorporate Cauchy boundary conditions. Yours will be a lot messier I assume. $\endgroup$
    – David
    Commented Feb 11, 2012 at 16:58
  • $\begingroup$ You should discuss this in the chat, comments aren't reallly suitable for things like these - it's kind of a new question you're asking there. $\endgroup$
    – David
    Commented Mar 23, 2012 at 22:54
  • $\begingroup$ Can you join here: chat.stackexchange.com/rooms/2885/solution-plots $\endgroup$
    – night owl
    Commented Mar 23, 2012 at 23:30
  • $\begingroup$ We can delete the recent comments $\endgroup$
    – night owl
    Commented Mar 23, 2012 at 23:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.