I am studying PDEs using the book "PDEs An Introduction 2nd edition" by Walter A. Strauss. In Chapter 2, a "geometric method" is described in order to solve linear PDEs of the type:
$$ (x,y)\mapsto u_x + yu_y = 0 $$
This is said to be equivalent to the directional derivative of $u$ in the direction of the vector $(1,y)$ being set to 0. Then characteristic curves having as tangent vectors $(1,y)$ are found
$$\frac{dy}{dx} = \frac{y}{1} \implies y = Ce^x $$
Since $u(x,y)$ is constant on these curves:
$$u(x,y) = f(e^{-x}y)$$
is the general solutions of the PDE, where $f$ is an arbitrary function. Now the same method is applied to solve more general equations, such as:
$$u_x + u_y + u = f(x,y)$$
I have tried to use the same method to solve the following differential equation:
$$yu_x -xu_y = 3x$$ where $ u(x,0) = x^2$
Then applying the method:
$$ \frac{dy}{dx} = \frac{-x}{y} \implies C = x^2 + y^2$$
The PDE reduces to an ODE:
$$\frac{du}{dx} = 3x/y \implies u (x,y) = 3x^2/2y + f(C)$$
However with the boundary imposed ($u(x,0) = x^2$) this seem impossible to solve since to find the particular solution I would have to divide the a term by zero. Does the method described in the book have limited scope? How can I solve this differential equation? Also, why is $u(x,y)$ constant on the "characteristic curves"?
I cannot see where you found an impossibility or an exception in the rules.
I the case of $\quad yu_x-xu_y=3x \tag 1$
$$\frac{dx}{y}=\frac{dy}{-x}=\frac{du}{3x}$$ A first family of characteristic curves comes from $\quad\frac{dx}{y}=\frac{dy}{-u}\quad$ which leads to $$x^2+y^2=c_1$$ A second family of characteristic curves comes from $\quad\frac{dy}{-x}=\frac{du}{3x}\quad$ which leads to $$u+3y=c_2$$ The general solution of the PDE $(1)$ expressed on the form of implicit equation is : $$\Phi(x^2+y^2\:,\:u+3y)=0$$ where $\Phi$ is an arbitrary fonction of two variables.
Or equivalently, the general solution of PDE $(1)$ on explicit form is $\quad u+3y=F(x^2+y^2)$ $$u(x,y)=-3y+F(x^2+y^2)$$
where $F(X)$ is an arbitrary function of the variable $X$ with $X=x^2+y^2$.
Boundary condition : $\quad u(x,0)=x^2=F(x^2+0^2)=F(x^2)$.
So, the function $F$ is now determined : $\quad F(X)=X.\quad$ Putting it into the above general solution where $X=x^2+y^2$ leads to the particular solution which fits the boundary condition : $$u(x,y)=-3y+(x^2+y^2)$$
OTHER EXAMPLE : $\quad u_x+u_y+u=e^{x+2y} \tag 2$ $$u_x+u_y=e^{x+2y}-u$$ $$\frac{dx}{1}=\frac{dy}{1}=\frac{du}{e^{x+2y}-u}$$ A first family of characteristic curves comes from $\quad\frac{dx}{1}=\frac{dy}{1}\quad$ which leads to $$x-y=c_1$$ A second family of characteristic curves comes from $\frac{dy}{1}=\frac{du}{e^{x+2y}-u}=\frac{du}{e^{(c_1+y)+2y}-u}=\frac{du}{e^{c_1+3y}-u}$ $$\frac{du}{dy}+u=e^{c_1+3y}$$ This is a first order linear ODE easy to solve : $\quad u=\frac14 e^{c_1+3y}+c_2e^{-y}=\frac14 e^{(x-y)+3y}+c_2e^{-y}$ $$ue^y-\frac14 e^{x+3y}=c_2$$ The general solution of the PDE $(2)$ expressed on the form of implicit equation is : $$\Phi\left((x-y)\:,\:(ue^y-\frac14 e^{x+3y})\right)=0$$ where $\Phi$ is an arbitrary fonction of two variables.
Or equivalently, the general solution of PDE $(2)$ on explicit form is from $\quad ue^y-\frac14 e^{x+3y}=F(x-y)$ $$u(x,y)=\frac14 e^{x+2y}+e^{-y}F(x-y)$$ where $F(X)$ is an arbitrary function of the variable $X=x-y$.