1
$\begingroup$

I am trying to solve the ODE $\dfrac{d^2 \bar{\phi}}{dx^2} - s \bar{\phi} = \dfrac{\cos(x)}{s}$.

If I am not mistaken, I can solve this using the method of undetermined coefficients.

Solving the homogeneous equation

$$\dfrac{d^2 \bar{\phi}}{dx^2} - s \bar{\phi} = 0,$$

we get the characteristic equation

$$m^2 - s = 0,$$

which gives us

$$m = \pm \sqrt{s}.$$

Therefore, the complementary equation is

$$y_c(x) = Ae^{x\sqrt{s}} + Be^{-x\sqrt{s}}$$

What I'm now confused about is the form of the particular solution. Given that we have $\dfrac{\cos(x)}{s}$, how do I go about solving this?

I would appreciate it if people could please take the time to clarify this.

$\endgroup$
1
$\begingroup$

The equation is in $x$, so you can treat $s$ as a constant. Let the particular solution be

$$ \phi_p(x) = A\cos x + B\sin x $$

Then ${\phi_p}'' = -A\cos x - B\sin x = -(A\cos x + B\sin x)$, therefore

$$ {\phi_p}'' - s\phi_p = -(A\cos x + B\sin x) - s(A\cos x + B\sin x) = -(1+s)(A\cos x + B\sin x) $$

This gives

$$ A = - \frac{1}{s(1+s)}, B = 0 $$

$\endgroup$
  • $\begingroup$ Thanks for the answer. Where did the $-$ symbol come from? I got $y_p(x) = \left( \dfrac{1}{s^2 - s} \right) \cos(x)$. $\endgroup$ – The Pointer Aug 28 '18 at 8:47
  • $\begingroup$ That's incorrect. $$-A\cos x - B\sin x - s(A\cos x + B\sin x) = (-1-s)A\cos x + (-1-s)B\sin x = \cdots $$ $\endgroup$ – Dylan Aug 28 '18 at 8:48
  • $\begingroup$ Hmm, I don't understand where you're getting ${\phi_p}'' = -\phi_p$ from? $\endgroup$ – The Pointer Aug 28 '18 at 8:50
  • $\begingroup$ Take the second derivative of $\phi_p$, and compare it to $\phi_p$. $\endgroup$ – Dylan Aug 28 '18 at 8:52
  • 1
    $\begingroup$ Again, you did it wrong. Check your signs. $$ \left(\frac{1}{s^2-s}\cos x\right)'' - \frac{s}{s^2-s}\cos x = \frac{1}{s-s^2}\cos x + \frac{s}{s-s^2}\cos x = \frac{1+s}{s^2-s}\cos x $$ $\endgroup$ – Dylan Aug 28 '18 at 8:54
1
$\begingroup$

For the particular solution, consider $$ A \cos x + B \sin x $$ and find your $A$ and $B$.

$\endgroup$
  • $\begingroup$ Thanks for the answer. But what about the $\dfrac{1}{s}$? This is what stumped me. $\endgroup$ – The Pointer Aug 28 '18 at 6:39
  • $\begingroup$ That is a constant and your A and B will depend on it. $\endgroup$ – Mohammad Riazi-Kermani Aug 28 '18 at 6:45
  • $\begingroup$ I get $-A\cos(x) - B\sin(x) - s(A\cos(x) + B\sin(x)) = \dfrac{\cos(x)}{s}$, but I don't think this is correct. Again, there's something not right with the constant $\dfrac{1}{s}$. $\endgroup$ – The Pointer Aug 28 '18 at 6:59
  • $\begingroup$ Oh, wait, I actually think that's correct. We get $B = 0$, $A = \dfrac{1}{s^2 - s}$. So we have that $y_p(x) = \left( \dfrac{1}{s^2 - s} \right) \cos(x)$. We now have that $y_p'(x) = \left( -\dfrac{1}{s^2 - s} \right) \sin(x) = \left( \dfrac{1}{s - s^2} \right) \sin(x)$, $y_p'(x) = \left( \dfrac{1}{s - s^2} \right) \cos(x)$. Substituting this back into the ODE, we have $\left( \dfrac{1}{s - s^2} \right) \cos(x) - s \left( \dfrac{1}{s^2 - s} \right) \cos(x) = \left( \dfrac{1}{s - s^2} \right) \cos(x) - \left( \dfrac{1}{s - 1} \right) \cos(x) = $ [...] $\endgroup$ – The Pointer Aug 28 '18 at 7:44
  • $\begingroup$ [...] $\left( \dfrac{1 - s}{s - s^2} \right) \cos(x) = \left( \dfrac{1}{s} \right) \cos(x)$, as required. $\endgroup$ – The Pointer Aug 28 '18 at 7:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.