# How to solve the following differential equation?

I'm pretty sure it's easy but this is the first time I have to solve a differential equation.

Given the following equation to solve:

$ty' + 2y = \sin(t)$.

I have no idea how to start solving it,

can you please explain me detaily?.. thanks in advance.

• WHat did you try ? – Claude Leibovici Jan 25 '14 at 12:34
• @ClaudeLeibovici tried to solve as ordinary equation but it didn't seem to work.. – Billie Jan 25 '14 at 12:38
• Ordinary differential equation, do you mean ? – Claude Leibovici Jan 25 '14 at 12:43
• @ClaudeLeibovici No, equation without function .. for example, x = 2y – Billie Jan 25 '14 at 12:44
• Did you learn about differential equations (they mix functions and their derivatives) ? What you post is not an algebraic equation (you even say it in the title of your post). SO, let us see what you know and we shall continue. – Claude Leibovici Jan 25 '14 at 12:47

After multiplication by $t$, we get $$t^2 y'+2 t y=t \sin{t},$$ $$\frac{d}{dt}(t^2 y)=t\sin{t},$$ or $$t^2 y=\int t \sin{t} dt,$$ $$t^2 y=-t \cos{t}+\sin{t}+C.$$ Finally, $$y=-\frac{\cos{t}}{t}+\frac{\sin{t}}{t^2}+\frac{C}{t^2}.$$

• Yes, that was a typo. – alans Jan 25 '14 at 13:04

General principle: Usually when you see an expression like $f(t)y'(t)+g(t)y(t)$, a standard idea is to find a function $h$ (called the integrating factor) such that $[f(t)h(t)]'=g(t)h(t)$. Then we note that $[f(t)h(t)y(t)]' = h(t)f(t)y'(t) + h(t)g(t)y(t) = h(t)[f(t)y'(t)+g(t)y(t)]$, and we can use this to simplify the original DE.

In this case, we multiply the equation by a function $h(t)$. This gives $$h(t) t y'(t) + 2 h(t) y'(t) = h(t) \sin(t)$$ If the function $h$ was chosen such that $[h(t)t]'=2h(t)$, we get $$[h(t)ty(t)]' = h(t) \sin(t),$$ and we can start solving the problem by integrating, if we know how to integrate the RHS. Remember the constant!

Now the problem is reduced to these parts:

1. What is a function $h(t)$ such that $[h(t)t]' = 2h(t)$?
2. What is an integral $F(t)$ of $h(t)\sin(t)$?
3. Solving $y(t)$ from $h(t) t y(t) = F(t) + C$.
• After reading the comments to the question, I understand this may be too advanced for the OP. Comments are welcome! – JiK Jan 25 '14 at 12:54