Problem 180
Hard Nonhomogeneous Equations

Solve the boundary value problem y^((4)) - 2y''' + 2y''…

Solve the boundary value problem $y^{(4)} - 2y''' + 2y'' - 2y' + y = \frac{\pi}{2} + 4\cos x$, with $y(0)=y'(0), \qquad y(\pi)=0, \qquad y'(\pi)=0$.

Explanation of Method

Three boundary conditions on four constants leave a genuine one-parameter family of solutions, because a homogeneous solution already satisfies all three conditions by itself.

Step 1: Homogeneous solution

The characteristic equation is $r^4-2r^3+2r^2-2r+1=0$. It factors as

\[ r^4-2r^3+2r^2-2r+1 = (r-1)^2(r^2+1) = 0, \]

giving roots $r=1$ (double) and $r=\pm i$. Hence

\[ y_h = (C_1+C_2x)e^{x} + C_3\cos x + C_4\sin x. \]

Step 2: Particular solution — splitting the forcing term

Let $L[y]=y^{(4)}-2y'''+2y''-2y'+y$, with characteristic polynomial $P(r)=(r-1)^2(r^2+1)$, and split $g(x)=\tfrac{\pi}{2}+4\cos x$.

Constant term $\pi/2$: $r=0$ is not a root.

Try $y_{p1}=A$. Since all derivatives of a constant vanish, $L[A]=A$. Setting $A=\tfrac\pi2$ gives $y_{p1}=\tfrac{\pi}{2}$.

Term $4\cos x$: $r=i$ is a simple root.

Since $r^2+1$ contributes the simple root $r=i$, plain $\cos x,\sin x$ are already homogeneous solutions, so try the resonant ansatz $y_{p2}=x(B\cos x+C\sin x)$. Direct differentiation gives $L[x\cos x]=4\cos x$ and $L[x\sin x]=4\sin x$ (the polynomial-in-$x$ terms cancel completely because $r=i$ is a root of $P$, leaving only the constant-coefficient remainder). So

\[ L[y_{p2}] = 4B\cos x + 4C\sin x \overset{!}{=} 4\cos x \;\Longrightarrow\; B=1,\ C=0, \]

giving $y_{p2}=x\cos x$.

So $y_p=\tfrac\pi2+x\cos x$, and the general solution of the ODE is

\[ y = (C_1+C_2x)e^x + C_3\cos x + C_4\sin x + \frac{\pi}{2} + x\cos x. \]

Step 3: Setting up the boundary conditions

Differentiating, $y' = (C_1+C_2+C_2x)e^x - C_3\sin x + C_4\cos x + \cos x - x\sin x$.

At $x=0$ ($\sin0=0,\cos0=1$): $y(0)=C_1+C_3+\tfrac\pi2$ and $y'(0)=C_1+C_2+C_4+1$. The condition $y(0)=y'(0)$ gives

\[ C_3 - C_2 - C_4 = 1 - \frac{\pi}{2}. \tag{A} \]

At $x=\pi$ ($\sin\pi=0,\cos\pi=-1$): $y(\pi)=(C_1+C_2\pi)e^{\pi} - C_3 + \tfrac\pi2 - \pi$. Setting $y(\pi)=0$: \[(C_1+C_2\pi)e^{\pi} = C_3 + \frac{\pi}{2}. \tag{B}\]

And $y'(\pi)=(C_1+C_2+C_2\pi)e^{\pi} - C_4 - 1$. Setting $y'(\pi)=0$: \[(C_1+C_2+C_2\pi)e^{\pi} = C_4 + 1. \tag{C}\]

This is a system of only three linear equations in the four unknowns $C_1,C_2,C_3,C_4$ — so, unlike a typical IVP, it need not (and here does not) pin down a unique solution.

Step 4: Solving the system: $C_2$ is forced to $0$

Subtracting (B) from (C): $C_2e^{\pi} = (C_4+1)e^{-\pi}\cdot e^{\pi}-(C_3+\tfrac\pi2)e^{-\pi}\cdot e^\pi$, i.e., dividing both sides of (B) and (C) by $e^\pi$ first, \[C_2 = e^{-\pi}\bigl[(C_4+1)-(C_3+\tfrac{\pi}{2})\bigr] = e^{-\pi}\bigl[C_4 - C_3 + 1 - \tfrac{\pi}{2}\bigr].\]

From (A), $C_4-C_3 = -(1-\tfrac\pi2+C_2) = \tfrac\pi2-1-C_2$. Substituting, \[C_2 = e^{-\pi}\bigl[(\tfrac{\pi}{2}-1-C_2) + 1 - \tfrac{\pi}{2}\bigr] = -C_2e^{-\pi} \;\Longrightarrow\; C_2(1+e^{-\pi}) = 0.\]

Since $1+e^{-\pi}\neq0$, this forces $C_2=0$.

With $C_2=0$, equation (A) becomes $C_3-C_4=1-\tfrac\pi2$; let $C_4=C$ be a free (arbitrary) constant, so $C_3=C+1-\tfrac\pi2$. Equation (B) then gives $C_1=(C_3+\tfrac\pi2)e^{-\pi}=(C+1)e^{-\pi}$, and one checks this same $C_1$ also satisfies (C), so the system is consistent for every value of $C$:

\[ C_1=(C+1)e^{-\pi}, \qquad C_2=0, \qquad C_3=C+1-\frac{\pi}{2}, \qquad C_4=C. \]

Step 5: The one-parameter family of solutions

Substituting these into $y=(C_1+C_2x)e^x+C_3\cos x+C_4\sin x+\tfrac\pi2+x\cos x$ and grouping the terms containing $C$:

\[ y = e^{x-\pi} + \left(1-\frac{\pi}{2}\right)\cos x + \frac{\pi}{2} + x\cos x \;+\; C\left(e^{x-\pi} + \cos x + \sin x\right), \]

where $C$ is an arbitrary constant — the boundary value problem has a genuine one-parameter family of solutions, not a unique one.

Step 6: Verification

Boundary conditions (identically in $C$): at $x=\pi$, the non-$C$ part gives $e^0+(1-\tfrac\pi2)(-1)+\tfrac\pi2+\pi(-1) = 1-1+\tfrac\pi2+\tfrac\pi2-\pi=0$, and the $C$-part is $C\cdot h(\pi)=0$, so $y(\pi)=0\ \checkmark$ for every $C$. Similarly $y'(\pi)=0\ \checkmark$ and $y(0)-y'(0)=0\ \checkmark$, using the values of $h$ computed above together with the non-$C$ part built to satisfy (A)–(C) at $C=0$.

The ODE: the non-$C$ part is exactly $y_h|_{C_2=0,\,C=0}+y_p$, which solves $L[y]=\tfrac\pi2+4\cos x$ by construction (Step 2), while $C\cdot h(x)$ solves $L[y]=0$; by linearity of $L$, their sum solves $L[y]=\tfrac\pi2+4\cos x$ for every $C$.\ $\checkmark$


Result

Final answer:

\[\boxed{\,y = e^{x-\pi} + \left(1-\frac{\pi}{2}\right)\cos x + \frac{\pi}{2} + x\cos x \;+\; C\left(e^{x-\pi} + \cos x + \sin x\right)\,}\]

Remark

Why the free parameter survives. The function $h(x)=e^{x-\pi}+\cos x+\sin x$ is itself a solution of the homogeneous equation $L[y]=0$ (it is a combination of $e^x$, $\cos x$, $\sin x$ from the fundamental system). Direct evaluation shows $h(\pi)=e^0+\cos\pi+\sin\pi=1-1+0=0$ and $h'(\pi)=e^0-\sin\pi+\cos\pi=1-0-1=0$, so $h$ already satisfies the two homogeneous conditions $y(\pi)=y'(\pi)=0$ by itself. And at $x=0$: $h(0)=e^{-\pi}+1$ while $h'(0)=e^{-\pi}-0+1=e^{-\pi}+1$, so $h(0)=h'(0)$ automatically as well. Since $h$ satisfies all three homogeneous versions of the boundary conditions, adding any multiple $Ch$ to one particular solution of the BVP produces another solution of the same BVP — which is exactly why $C$ is left undetermined.