Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to solve the following first order differential equation?

$$\dfrac{dy}{dt}+kty(t) = \dfrac{\sin(\pi t/10)}{\pi}$$

share|cite|improve this question
up vote 2 down vote accepted

First note that $$\dfrac{dy}{dt} + kty = e^{-kt^2/2} \left(e^{kt^2/2} \dfrac{dy}{dt} + e^{kt^2/2}kty \right) = e^{-kt^2/2} \dfrac{d}{dt}\left(e^{kt^2/2} y\right) = \dfrac{\sin \left(\dfrac{\pi t}{10}\right)}{10}$$ Hence, we have that $$\dfrac{d}{dt}\left(e^{kt^2/2} y\right) = e^{kt^2/2} \dfrac{\sin \left(\dfrac{\pi t}{10}\right)}{10}$$ Hence, $$e^{kt^2/2}y(t) = y(0) + \dfrac1{10} \int_0^t e^{kx^2/2} \sin \left(\dfrac{\pi x}{10}\right) dx$$ $$y(t) = y(0)e^{-kt^2/2} + \dfrac{e^{-kt^2/2}}{10} \int_0^t e^{kx^2/2} \sin \left(\dfrac{\pi x}{10}\right) dx$$

share|cite|improve this answer
You forgot the factor $e^{-k t^2/2}$. – Robert Israel Dec 21 '12 at 20:20
@RobertIsrael Thanks. Fixed it now. – user17762 Dec 21 '12 at 20:21
By the way, the integral is not elementary: it can be expressed using the error function. – Robert Israel Dec 21 '12 at 20:28
Adding to @RobertIsrael's comment, the integral $$\int_0^t e^{kx^2/2} \sin \left(\dfrac{\pi x}{10}\right) dx$$ can be written in terms of error function, by replacing $\sin(\pi x/10)$, as $\dfrac{\exp(i \pi x/10) - \exp(-i \pi x/10)}{2i}$ and hence $$\int_0^t e^{kx^2/2} \sin \left(\dfrac{\pi x}{10}\right) dx = \dfrac1{2i} \int_0^t \exp(kx^2/2 + i \pi x/10) dx - \dfrac1{2i} \int_0^t \exp(kx^2/2 - i \pi x/10) dx$$ – user17762 Dec 21 '12 at 20:34

This is a first order linear differential equation. You can solve it by using the integrating factor method. Here is a reference:

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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