# Derive the solution of the pde problem

Derive the solution of the problem $$u_{xy} + (\tan(y))u_x = 2 x \tan(y)$$ with $$u(x,0) = x^2 + e^{x^3}$$ and $$u(0,y) = y^{10} + \cos(y)$$.

How do I solve this question?, I think it's by separation of variables, but I can't figure it out.

Multiply both sides by $$1/ \cos y$$, integrate with respect to $$x$$ and write: $$$$\dfrac{\partial}{\partial y} \left( \dfrac{u-x^2}{\cos y} \right) = f(y)$$$$ So we integrate this once again and write: $$$$u=x^2 + F(y) \cos y+G(x)\cos y.$$$$ Apply boundary conditions to get: $$$$u(x,y) = x^2 + e^{x^3} \cos y + y^{10}.$$$$
Basically the same approach with some more details. You could notice that you equation does not contain $$u$$ but only partial derivatives. Set $$v(x,y)=u_x$$, which should solve $$v_y+(\tan y) v=2x\tan y.$$ Note that this is an ODE in $$y$$ at fixed $$x$$. Find the solution, first the homogeneous equation $$v(x,y)=\lambda(x,y)\cos y$$ that you plug into the full equation to get $$\lambda(x,y)=\frac{2x}{\cos y}+p(x)$$ for an arbitrary $$p$$, so that you get $$v(x,y)=2x+p(x)\cos y$$ Coming back to $$u$$ by integrating in $$x$$, you get $$u(x,y)=x^2+P(x)\cos y +Q(y)$$ where $$P,Q$$ are arbitrary functions. You will set these using boundary conditions: $$u(x,0)=x^2+P(x)=x^2+e^{x^3}+Q(0)$$ give $$P(x)+Q(0)=e^{x^3}$$ and then $$u(0,y)=(1-Q(0))\cos y+Q(y)=y^{10}+\cos y$$ provides $$Q(y)-Q(0)\cos y=y^{10}$$. Leading to $$u(x,y)=x^2+e^{x^3}\cos y+y^{10}.$$