# What is a general solution to the differential equation dy/dt+3ty=sint?

Sep 8, 2016

cannot be solved using elementary functions

#### Explanation:

$\frac{\mathrm{dy}}{\mathrm{dt}} + 3 t y = \sin t$

we can make the LHS exact by using an integrating factor $\xi \left(t\right) = {e}^{\int 3 t \mathrm{dt}} = {e}^{\frac{3 {t}^{2}}{2}}$

$\xi \left(\frac{\mathrm{dy}}{\mathrm{dt}} + 3 t y\right) = \xi \sin t$

$\implies {e}^{\frac{3 {t}^{2}}{2}} \frac{\mathrm{dy}}{\mathrm{dt}} + {e}^{\frac{3 {t}^{2}}{2}} 3 t y = {e}^{\frac{3 {t}^{2}}{2}} \sin t$

this is helpful because the LHS is now:

${e}^{\frac{3 {t}^{2}}{2}} \frac{\mathrm{dy}}{\mathrm{dt}} + {e}^{\frac{3 {t}^{2}}{2}} 3 t y = \frac{d}{\mathrm{dt}} \left(y {e}^{\frac{3 {t}^{2}}{2}}\right)$

So $\frac{d}{\mathrm{dt}} \left(y {e}^{\frac{3 {t}^{2}}{2}}\right) = {e}^{\frac{3 {t}^{2}}{2}} \sin t$

and now the RHS looks horrible

$\implies y {e}^{\frac{3 {t}^{2}}{2}} = \int {e}^{\frac{3 {t}^{2}}{2}} \sin t \mathrm{dt}$

which cannot be solved using elementary functions

Sep 8, 2016

y = i C_1"Im"[e^gamma sqrt(pi)/2"erf"(i/sqrt[6] - sqrt[3/2] t)]e^(-3/2t^2)

#### Explanation:

The differential equation is linear non homogeneous so the solution is composed as

$y = {y}_{h} + {y}_{p}$

where

$\frac{{\mathrm{dy}}_{h}}{\mathrm{dt}} + 3 t {y}_{h} = 0$
$\frac{{\mathrm{dy}}_{p}}{\mathrm{dt}} + 3 t {y}_{p} = \sin t$

The homogeneous solution can be easily obtained. So grouping variables

${\mathrm{dy}}_{h} / {y}_{h} = - 3 t \mathrm{dt}$

giving

${y}_{h} = C {e}^{- \frac{3}{2} {t}^{2}}$

The particular solution can be obtained adopting the so called constants variation technique due to Lagrange. Posing

${y}_{p} = C \left(t\right) {e}^{- \frac{3}{2} {t}^{2}}$ and substituting in the particular equation, giving

$\frac{d}{\mathrm{dt}} C \left(t\right) = {e}^{- \frac{3}{2} {t}^{2}} \sin t$

The next step is the $C \left(t\right)$ determination.

$C \left(t\right) = \int {e}^{- \frac{3}{2} {t}^{2}} \sin t \mathrm{dt}$. We will solve this integral solving instead

$- i \text{Im} \left[\int {e}^{- \frac{3}{2} {t}^{2}} \left(\cos t + i \sin t\right) \mathrm{dt}\right]$

$\int {e}^{- \frac{3}{2} {t}^{2}} \left(\cos t + i \sin t\right) \mathrm{dt} = \int {e}^{- \frac{3}{2} {t}^{2} + i t} \mathrm{dt}$

Choosing now $\alpha , \beta , \gamma$ such that

${\left(\alpha t + i \beta\right)}^{2} = - \left(- \frac{3}{2} {t}^{2} + i t + \gamma\right)$

$\alpha = \sqrt{\frac{3}{2}} , \beta = - \frac{1}{\sqrt{6}} , \gamma = \frac{1}{6}$

and making $y = \alpha t + \beta$ we have

$\alpha \mathrm{dt} = \mathrm{dy}$ and the integral reads

$\int {e}^{- \frac{3}{2} {t}^{2} + i t} \mathrm{dt} \equiv {e}^{\gamma} \int {e}^{- {y}^{2}} \mathrm{dy} = {e}^{\gamma} \frac{\sqrt{\pi}}{2} \text{erf} \left(y\right)$

so, finally

C(t) = i "Im"[e^gamma sqrt(pi)/2"erf"(i/sqrt[6] - sqrt[3/2] t)]

and

y = i C_1"Im"[e^gamma sqrt(pi)/2"erf"(i/sqrt[6] - sqrt[3/2] t)]e^(-3/2t^2)