Solve the BVP
$$\begin{cases}
u''+a^2u=\sin\pi x, 0 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$.
Second order inhomogeneous ODE
0
$\begingroup$
ordinary-differential-equations
pde
boundary-value-problem
-
2What are you asking? – 2017-02-22
-
0@Chappers, sorry. I edited the post. – 2017-02-22
-
0There is a mistake when differentiating $C_3 x \sin(\pi x)$. The first minus sign must not be there. – 2017-02-23
-
0@Shashi, thank you. But this doesn't change anything since the term $x\sin(\pi x)$ vanishes anyway when I plug it into the BVP because on the right hand side we only have the term $x\sin(\pi x)$. – 2017-02-23
-
0@ozarka are you sure that $u(1)=-2$ is given instead of $u'(1)=-2$? I think that it must be $u'(1)=-2$ – 2017-02-23
-
0If $u(1)=-2$, then for $a=\pi$ you get $C_1=1$ and $C_1=2-\frac{1}{2\pi}$ which is contradictory – 2017-02-23
-
0Yes, $u(1)=-2$ because we're only dealing with Dirichlet type conditions. – 2017-02-23
-
0But I think we should expect the function $u$ to fail at $a=\pm\pi$ since the question specifically asks us to observe when $a=\pm\pi$. – 2017-02-23
-
0@ozarka yes that will be the case I think. However, I don't know much about Drichlet conditions. I thought it was saying $u'$ when I saw it – 2017-02-23
1 Answers
0
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.
-
0Thank you. To confirm is the homogeneous solution $C_1\sin(ax)+C_2\cos(ax)$ the same for both $a=\pm\pi$ and $a\neq\pm\pi$? – 2017-02-23
-
0@ozarka yes! The homogeneous part remains the same. – 2017-02-23
-
0Could you check my new attempt? I feel like my constant $C_2$ is wrong because $u$ is being undefined when $a=\pm\pi$. – 2017-02-23