Solve the initial value problem y'' - y' + e^(2x)y = e^(2x)…
Solve the initial value problem $y'' - y' + e^{2x}y = e^{2x}$, with $y(\ln\pi)=0, \qquad y'(\ln\pi)=0$.
Explanation of Method
Setting $t=e^x$ turns the exponential coefficient into a polynomial one, reducing the equation to $Y''+Y=1$ before the initial conditions pin down a closed-form solution.
Step 1: Choosing the substitution $t=e^x$
The equation mixes $y'$ with a coefficient $e^{2x}$ on $y$; since $e^{2x}=(e^x)^2$, setting $t=e^x$ is a natural way to turn the exponential coefficient into a polynomial one. With $t=e^x$, $dt/dx=e^x=t$, and $x=\ln t$. Let $Y(t)=y(x)$.
Step 2: Transforming the derivatives
By the chain rule, $y' = \frac{dY}{dt}\frac{dt}{dx} = tY'(t)$.
Differentiating again, using $dt/dx=t$: \[y'' = \frac{d}{dx}\bigl(tY'\bigr) = \frac{d}{dt}\bigl(tY'\bigr)\cdot t = \bigl(Y'+tY''\bigr)t = tY' + t^2Y''.\]
Step 3: Substituting into the equation
Since $e^{2x}=t^2$, substituting into $y''-y'+e^{2x}y$ gives
\[ \bigl(tY'+t^2Y''\bigr) - tY' + t^2Y = t^2Y'' + t^2Y, \]
the $tY'$ terms cancelling exactly. The right-hand side is $e^{2x}=t^2$, so the equation becomes $t^2Y''+t^2Y=t^2$. Dividing by $t^2$ (valid since $t=e^x>0$): $Y'' + Y = 1$.
Step 4: Solving the transformed equation
The characteristic equation $r^2+1=0$ has roots $r=\pm i$, so the homogeneous solution is $Y_h=C_1\cos t+C_2\sin t$. Since the constant forcing term $1$ is not itself a homogeneous solution, try $Y_p=A$ (constant): $Y_p''+Y_p=0+A=1\Rightarrow A=1$. Hence
\[ Y(t) = C_1\cos t + C_2\sin t + 1. \]
Step 5: Back-substituting $t=e^x$
\[ y = C_1\cos(e^x) + C_2\sin(e^x) + 1. \]
Differentiating with the chain rule ($d/dx\,e^x=e^x$): $y' = -C_1e^x\sin(e^x) + C_2e^x\cos(e^x)$.
Step 6: Applying the initial conditions
At $x=\ln\pi$, $e^x=\pi$, so $\cos(e^x)=\cos\pi=-1$ and $\sin(e^x)=\sin\pi=0$. From $y(\ln\pi)=0$: \[C_1(-1) + C_2(0) + 1 = -C_1+1 = 0 \;\Longrightarrow\; C_1 = 1.\]
From $y'(\ln\pi)=0$, using $e^x=\pi$, $\sin\pi=0$, $\cos\pi=-1$: \[-C_1\pi\sin\pi + C_2\pi\cos\pi = -C_2\pi = 0 \;\Longrightarrow\; C_2 = 0.\]
Step 7: Solution
The solution is recorded in the result below.
Step 8: Verification
With $y=\cos(e^x)+1$, the chain rule gives $y'=-e^x\sin(e^x)$. Differentiating once more (product rule on $-e^x\sin(e^x)$): $y'' = -e^x\sin(e^x) - e^x\cdot e^x\cos(e^x) = -e^x\sin(e^x) - e^{2x}\cos(e^x)$.
Substituting into $y''-y'+e^{2x}y$: \[y''-y' = \bigl[-e^x\sin(e^x)-e^{2x}\cos(e^x)\bigr] - \bigl[-e^x\sin(e^x)\bigr] = -e^{2x}\cos(e^x),\]
\[ y''-y'+e^{2x}y = -e^{2x}\cos(e^x) + e^{2x}\bigl(\cos(e^x)+1\bigr) = e^{2x}.\ \checkmark \]
The initial conditions check directly: $y(\ln\pi)=\cos\pi+1=-1+1=0\ \checkmark$, and $y'(\ln\pi)=-\pi\sin\pi=-\pi\cdot0=0.\ \checkmark$
Result
Final answer:
\[\boxed{\,y = \cos(e^x) + 1\,}\]
Remark
Remark. The substitution $t=e^x$ is a diffeomorphism of $(-\infty,\infty)$ onto $(0,\infty)$, so it is exactly reversible and introduces no extraneous solutions or restrictions — the closed form $y=\cos(e^x)+1$ is valid for all real $x$.