# Solve: $U_x+U_y+U=e^{x+2y}$ with $U(x,0)=0$ [duplicate]

So, I've been tasked with solving the above. I've gone up to the general solution which wasn't too tricky:

$$U(x,y)=e^{-x}(\frac{R_1e^{4x}}{4}+f(y-x))$$

However, it gets a bit strange for me when I'm equipped with any initial/boundary data alongside it. So doing the obvious thing and just inputting the respective values gives me

$$U(x,0)=e^{-x}(\frac{R_1e^{4x}}{4}+f(-x))=0,$$

but then what does that tell me and how do I get the overall solution from it? Do I just solve for $f(-x)$? If so, then

$$\frac{R_1e^{4x}}{4}+f(-x)=0,$$

or equivalently

$$R_1e^{4x}+4f(-x)=0,$$

then

$$4f(-x)=-R_1e^{4x},$$

so

$$f(-x)=\frac{-R_1e^{4x}}{4} \Rightarrow f(-x)=Ce^{4x}.$$

So then what? Do I then try to apply this to when $f$ takes $y-x$ as its argument? So then we'll have

$$U(x,y)=f(y-x)=Ce^{4x-4y},$$

and conclude that as our solution? I realise that something has gone wrong here, because when I do compute the partial derivatives and substitute them back into my original question, the left hand side and right hand side don't quite equal each other?

Or, do I end up keeping the general solution that I obtained and then substitute my $f(y-x)$ expression that I obtained when putting in the initial data?

$$U_x+U_y=-U+e^{x+2y}$$ $$\frac{dx}{1}=\frac{dy}{1}=\frac{dU}{-U+e^{x+2y}}$$ First characteristic equation :$\quad \frac{dx}{1}=\frac{dy}{1} \quad\to\quad y-x=c_1$

Second characteristic equation :$\quad \frac{dx}{1}=\frac{dU}{-U+e^{x+2y}}=\frac{dU}{-U+e^{x+2(c_1+x)}}\quad\to\quad \frac{dU}{dx}+U=e^{3x+2c_1}$

The solution of this linear ODE is : $\quad U=\frac{1}{4}e^{2c_1+3x}+c_2e^{-x}=\frac{1}{4}e^{2y+x}+c_2e^{-x}$ $$e^x(U-\frac{1}{4}e^{2y+x})=c_2$$ General solution of the PDE : $\quad e^x(U-\frac{1}{4}e^{2y+x})=f(y-x)$ $$U(x,y)=\frac{1}{4}e^{2y+x}+e^{-x}f(y-x)$$ Boundary condition :

$U(x,0)=0=\frac{1}{4}e^{0+x}+e^{-x}f(0-x)\quad\to\quad f(-x)=-\frac{1}{4}e^{2x}$

This determines the function $\quad f(X)= -\frac{1}{4}e^{-2X}$

Puting $\quad f(y-x)= -\frac{1}{4}e^{-2(y-x)}\quad$ into the general solution leads to the particular solution fitting the boundary condition : $$U(x,y)=\frac{1}{4}e^{2y+x}-\frac{1}{4}e^{-2y+x}$$

• Ah right, so I messed up in the original computation of the general solution, and there I was thinking it wasn't too tricky...*sigh*...back to the drawing board. Thank you for your help! – thesmallprint Oct 13 '17 at 21:04