# Solving a Cauchy Problem using Method of Characteristics

I came across a partial differential equation (IVP PDE) that I would like to solve:

$$\{u_y+cos(ky)u_x=ax^2 | u(x,0)=0\}$$

This should be a quasilinear PDE, and is in the format of a Cauchy Problem, in the form of:

$$au_x+bu_y=c$$ Such that a, b, and c are constants.

In my particular case, I have:

$$\left\{ \begin{array}{c} a=cos(ky) \\ b=1 \\ c=ax^2 \end{array} \right.$$ Using the Lagrange-Carpit Equations: $$\frac{dx}{cos(ky)}=\frac{dy}{1}=\frac{du}{ax^2}$$ Rearranging gives: $$\frac{dx}{dy}=cos(ky)$$ $$dy=\frac{du}{ax^2}$$ I then canclulated $dx-dy$: $$du=(ax^2cos(ky)+1)dy-dx$$ Integrate to obtain $u(x,y,a,k)$: $$u(x,y,a,k)=\frac{1}{k}ax^2sin(ky)+y-x+C_1$$ I applied the initial condition of $u(x,0)=0$ and made $x=0$, which gave $C_1=0$. The question is thus finalised.

This however does not look correct. Am I doing the right thing?

I would also like to see what the characteristic curves look like, what are these? Are they essentially the terms $a, b, c$ I obtained above? Or rather, I simply differentiate those three variables in terms of $s$. Essentially calculating $\frac{dy}{ds}$, $\frac{dx}{ds}$ and $\frac{dz}{ds}$.

The integration you performed is not correct as $$x$$ has dependence on $$y$$ (in fact, the first equation tell us how they are related).

Nevertheless, we can integrate the equations. Further, we get an explicit expression for $$u$$. I take as starting point these equations:

$$\frac{dx}{\cos(ky)}=\frac{dy}{1}=\frac{du}{ax^2}$$

From them:

$$dx=dy\cos(ky)$$ and $$\dfrac{ax^2dx}{\cos(ky)}=du$$ From the first one,

$$x+c_1=\dfrac{1}{k}\sin(ky)$$ or $$c_1=\dfrac{1}{k}\sin(ky)-x$$

From here, we can write the cosine as function of $$x$$ to integrate the second one:

$$\sqrt{1-k^2(x+c_1)^2}=\cos(ky)$$

Substituting into the second one

$$\dfrac{ax^2dx}{\sqrt{1-k^2(x+c_1)^2}}=du$$

And integrating:

$$u+c_2=\dfrac{a\left((2k^2c_1^2+1)\arcsin(k(x+c_1))+k(3c_1-x)\sqrt{1-k^2(x+c_1)^2}\right)}{2k^3}$$

Eliminating $$c_1$$

$$u+c_2=\dfrac{a\left(\left(2k^2\left(\dfrac{1}{k}\sin(ky)-x\right)^2+1\right)y+\left(\dfrac{3}{k}\sin(ky)-4x\right)\cos(ky)\right)}{2k^2}$$

At last, considering that $$c_2=f(c_1)$$ with $$f$$ a single argument differentiable function, the general solution is:

$$u(x,y)=\dfrac{a\left(\left(2k^2\left(\dfrac{1}{k}\sin(ky)-x\right)^2+1\right)y+\left(\dfrac{3}{k}\sin(ky)-4x\right)\cos(ky)\right)}{2k^2}-f\left(\dfrac{1}{k}\sin(ky)-x\right)$$

Now, the boundary conditions $$u(x,0)=0$$ impose some restriction for $$f$$:

$$u(x,0)=\dfrac{-2ax}{k^2}-f(-x)=0$$

So $$f(x)=\dfrac{2ax}{k^2}$$ and

$$u(x,y)=\dfrac{a\left(\left(2k^2\left(\dfrac{1}{k}\sin(ky)-x\right)^2+1\right)y+\left(\dfrac{3}{k}\sin(ky)-4x\right)\cos(ky)\right)}{2k^2}-\dfrac{2a}{k^2}\left(\dfrac{1}{k}\sin(ky)-x\right)$$

$$u(x,y)=\dfrac{a}{2k^2}\left(\left(2k^2\left(\dfrac{1}{k}\sin(ky)-x\right)^2+1\right)y+\left(\dfrac{3}{k}\sin(ky)-4x\right)\cos(ky)-\left(\dfrac{1}{k}\sin(ky)-x\right)4\right)$$