7.1.5 problem number 5

problem number 422

Added January 2, 2019.

Problem 1.5 from Handbook of first order partial differential equations by Polyanin, Zaitsev, Moussiaux.

Solve for \(w(x,y)\) \[ w_x = w f(x,y)+ g(x,y) \]

Mathematica

ClearAll["Global`*"]; 
pde =  D[w[x, y], x] == w[x, y]*f[x, y] + g[x, y]; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[pde, w[x, y], {x, y}], 60*10]];
 

\[\left \{\left \{w(x,y)\to \exp \left (\int _1^xf(K[1],y)dK[1]\right ) \left (\int _1^x\exp \left (-\int _1^{K[2]}f(K[1],y)dK[1]\right ) g(K[2],y)dK[2]+c_1(y)\right )\right \}\right \}\]

Maple

restart; 
pde := diff(w(x,y),x)=w(x,y)*f(x,y)+g(x,y); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve(pde,w(x,y))),output='realtime'));
 

\[w \left (x , y\right ) = \left (\int {\mathrm e}^{-\left (\int f \left (x , y\right )d x \right )} g \left (x , y\right )d x +\textit {\_F1} \left (y \right )\right ) {\mathrm e}^{\int f \left (x , y\right )d x}\]

Hand solution

\begin {align*} \frac {\partial w}{\partial x} & =wf\left ( x,y\right ) +g\left ( x,y\right ) \\ \frac {\partial w}{\partial x}-wf\left ( x,y\right ) & =g\left ( x,y\right ) \end {align*}

We can treat this similar to linear ODE and use an integrating factor \(I=e^{-\int f\left ( x,y\right ) dx}\) hence the above becomes\begin {align*} \frac {\partial }{\partial x}\left ( we^{-\int f\left ( x,y\right ) dx}\right ) & =e^{-\int wdx}g\left ( x,y\right ) \\ we^{-\int f\left ( x,y\right ) dx} & =\int e^{-\int f\left ( x,y\right ) dx}g\left ( x,y\right ) dx+G\left ( y\right ) \\ w & =\left ( \int e^{-\int f\left ( x,y\right ) dx}g\left ( x,y\right ) dx+G\left ( y\right ) \right ) e^{\int f\left ( x,y\right ) dx} \end {align*}

____________________________________________________________________________________