3
$\begingroup$

As the title says I'm trying to make DSolve solve the transport equation in 2 spatial dimensions. I tried

DSolve[{D[u[t, x, y], t] + b1 D[u[t, x, y], x] + 
b2 D[u[t, x, y], y] == 0, u[0, x, y] == g[x, y]}, u[t, x, y], {t, x, y}]

which didn't give me any output. The one-dimensional equivalent works just fine

DSolve[{D[u[t,x],t]+ b D[u[t,x],x]==0,u[0,x]==g[x]},u[t,x],{t,x}]

Do I miss something?

$\endgroup$
3
$\begingroup$

It's just because DSolve is relatively weak - at least as of now, so let's help it a bit by finding the general solution first:

generalsol = 
 u /. First@DSolve[D[u[t, x, y], t] + b1 D[u[t, x, y], x] + b2 D[u[t, x, y], y] == 0, 
    u, {t, x, y}]
(* Function[{t, x, y}, C[1][-b1 t + x, -b2 t + y]] *)

Then substitute it into the i.c.:

u[0, x, y] == g[x, y] /. u -> generalsol
(* C[1][x, y] == g[x, y] *)

It's clear g == C[1], so the particular solution is

generalsol[t, x, y] /. C[1] -> g
(* g[-b1 t + x, -b2 t + y] *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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