# How do you solve this inhomogenous differential equation by Frobenius method/Series solution?

So I'm solving some practice questions and I have a differential equation $$y''-3y'+2y=\sin(x)$$ about $$x=0$$, and I'm told to solve it using the Frobenius method. I don't think that's possible because $$x=0$$ would be an ordinary point rather than a singular point, so I'm solving it by using a series solution method. However, I think I'm forgetting how you use it for a nonhomogenous equation? What do I do with the $$sin(x)$$ that I have at the RHS?

My current progress is below:

$$y(x) = \sum_{n=0}^{\infty} a_nx^n$$

$$y'(x) = \sum_{n=1}^{\infty} na_nx^{n-1}$$

$$y''(x) = \sum_{n=2}^{\infty} n(n-1)a_nx^{n-2}$$

Then, putting it into the equation and then simplifying, I get:

$$\sum_{n=0}^{\infty}\bigg[(n+2)(n+1)a_{n+2} - 3(n+1)a_{n+1} + 2a_n \bigg]x^n = \sin(x)$$

I have two questions about this. Should I solve it homogenously first and get an expression for the $$a_n$$'s and stuff, or should I keep the $$\sin(x)$$ there? And if I do, what do I do with it? Like how do I get a proper expression that'll give me a solution to the DE? I've been trying to find examples online but most of them only have the RHS equal to constants or powers of x, and no other functions, which is why I'm kind of confused. Any help at all would make me super super grateful!!

• Looks like you need to use also $\sin x = x - \frac{x^3}{3!} + \cdots +$ Sep 29 '21 at 18:20
• Oh my,,, how did I not,,, think of it this way /)_- Okay so when I do this, I can just compare the coefficients? Would that work? (I'm also going to try this right now and see where this goes jbtw, but yeah, if you could answer this, it'd be helpful!) Sep 29 '21 at 18:23

Here is another method you can compare with: \begin{align*} y'' - 3y' + 2y = \sin(x) & \Longleftrightarrow (y' - 2y)' - (y' - 2y) = \sin(x)\\\\ & \Longleftrightarrow u' - u = \sin(x)\\\\ & \Longleftrightarrow [\exp(-x)u]' = \exp(-x)\sin(x)\\\\ & \Longleftrightarrow \exp(-x)u = -\exp(-x)\left[\frac{\cos(x) + \sin(x)}{2}\right] + k\\\\ & \Longleftrightarrow y' - 2y = -\frac{\cos(x) + \sin(x)}{2} + k\exp(x)\\\\ & \Longleftrightarrow [\exp(-2x)y]' = -\exp(-2x)\left[\frac{\cos(x) + \sin(x)}{2}\right] + k\exp(-x)\\\\ \end{align*}
The power series of the sine function is given by: \begin{align*} \sin(x) = x - \frac{x^{3}}{3!} + \frac{x^{5}}{5!} - \frac{x^{7}}{7!} + \ldots \end{align*}
• Hi, thank you for posting this! So I would be able to do it this way, however this is a part of a series solution practice set and I genuinely can't figure out how to do it that way. It seems like a simple enough problem for other methods, but for this one, I somehow can't figure out how to make it work? My only problem is that I don't know what to do with the $sin(x)$ that I have on the right side, I'd be able to solve it if it was a power of x or a constant because I can compare it to the examples I've already seen, but with this, I'm really not sure how to do it with this method :/ Sep 29 '21 at 18:20