$\frac{\partial^2 z}{\partial x^2}+z=0$, given that at $x=0, z=e^y$ and $\frac{\partial z}{\partial x}=1$
I am doing it in following way:
Integrating w.r.t x twice
$\implies \frac{\partial z}{\partial x} +zx=f(y)$, where f(y) is an arbitrary function ...(1)
$\implies z +\frac {zx^2}{2}=xf(y)+g(y) $, where g(y) is an arbitrary function ...(2)
Putting $x=0, z=e^y$ and $\frac{\partial z}{\partial x}=1$ in (1) and (2)
$\implies e^y=g(y)$ and $f(y)=1$
$\implies z(1+\frac {x^2}{2})=x+e^y $
But the answer to this question is given as $z=sinx+e^ycosx$.
Can someone tell me how to solve this PDE by direct integration only?
$\endgroup$ 11 Answer
$\begingroup$Just pretend that $y$ is a constant and solve the equation as if $z$ is a function of $x$ alone. Then the solution is $A \cos x+B\sin x$ where $A$ and $B$ are constants. Now if you consider $y$ as a variable then you have to replace $A$ and $B$ by functions of $y$. The initial conditions easily give you $A=e^{y}$ and $B=1$ so the solution is $e^{y} \cos x+\sin x$.
$\endgroup$ 1