Taken from Mathematica help pages
Solve for \(u(x,y)\)
with initial value \(u(x,0)=e^{-x^2}\)
Mathematica ✓
ClearAll["Global`*"]; pde = x*D[u[x, y], y] + y*D[u[x, y], x] == -4*x*y*u[x, y]; ic = u[x, 0] == Exp[-x^2]; sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, ic}, u[x, y], {x, y}], 60*10]];
Maple ✓
restart; pde := x*diff(u(x, y), y) + y*diff(u(x, y), x) = -4*x*y*u(x, y); ic := u(x, 0) = exp(-x^2); cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, ic], u(x, y))),output='realtime'));
Hand solution
Solve
with \(u\left ( x,0\right ) =e^{-x^{2}}\).
Solution
Let \(u\equiv u\left ( x\left ( y\right ) ,y\right ) \). We’ve taken \(y\) as the independent variable for \(x\left ( y\right ) \) here, since the initial conditions has \(y\left ( 0\right ) \) in it. The PDE can be written as
Solving (3) gives
At \(y=0\), using initial conditions the above becomes
(5) becomes
All what is left is to find \(x\left ( 0\right ) \) to finish the solution. From (4)
Hence (6) becomes
Substituting the above in (5A) gives
The following is a plot of the above solution showing the initial conditions are red line
___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________