Second order inhomogeneous ODE

207 Views Asked by At

Solve the BVP $$\begin{cases} u''+a^2u=\sin\pi x, 0<x<1 \\ u(0)=1,\quad u(1)=-2 \end{cases}$$ for all $a\in\mathbb{R}$. What are the solutions in the cases $a=\pm\pi$.


Given that the BVP is a second-order inhomogeneous ODE, we find the characteristic equation to be in the form $$r^2+a^2=0\implies r=\pm ai.$$

The homogeneous equation is $$u_h=C_1\cos(ax)+C_2\sin(ax).$$

The particular equation is $$u_p=C_3x\sin(\pi x)+C_4x\cos(\pi x),$$ $$u_p'=-C_3\pi x\cos(\pi x)+C_3\sin(\pi x)-C_4\pi x\sin(\pi x)+C_4\cos(\pi x),$$ $$u_p''=-C_3\pi^2 x\sin(\pi x)+2C_3\pi\cos(\pi x)-2C_4\pi\sin(\pi x)-C_4\pi^2 x\cos(\pi x).$$

Substituting for the given ODE, we have \begin{multline*} u_p''+\pi^2u = -C_3\pi^2 x\sin(\pi x)+2C_3\pi\cos(\pi x)-2C_4\sin(\pi x)-C_4\pi^2 x\cos(\pi x) \\ +\pi^2(C_3x\sin(\pi x)+C_4x\cos(\pi x))=\sin(\pi x), \end{multline*}

and we get $C_3=0$ and $C_4=-\frac{1}{2\pi}$. Then the general solution is, $$u=u_h+u_p=C_1\cos(ax)+C_2\sin(ax)-\frac{1}{2\pi}x\cos(\pi x)$$

Using the given initial conditions, we get $C_1=1$ and $C_2=\frac{-2-\frac{1}{2\pi}-\cos(a)}{\sin(a)}$. Then the general solution is,

$$u=u_h+u_p=\cos(ax)+\frac{-2-\frac{1}{2\pi}-\cos(a)}{\sin(a)}\sin(ax)-\frac{1}{2\pi}x\cos(\pi x)$$

Note that if $a=\pm\pi$ then $\sin(\pm\pi)=0$, which indicates $u$ is undefined at $a=\pm\pi$.

1

There are 1 best solutions below

3
On

Hint:

For $a=\pm \pi$, try: \begin{align*}u_I(x)=Ax\sin(\pi x) +Bx \cos(\pi x) \end{align*} for the inhomogeneous part. Calculate $u''_I$ and put it in the equation to find the constants $A$ and $B$.

For $a\neq \pm \pi$, try: \begin{align*} u_I(x)=A\sin(a x) +B \cos(a x) \end{align*}

I hope you can finish it from here.