# First-order ODE

1. Jan 11, 2007

### tandoorichicken

1. The problem statement, all variables and given/known data

It's been a couple years since diff. eq.

Any tips/strategies on solving the first-order ODE:
$$K\frac{dp(t)}{dt} + \frac{p(t)}{R} = Q_0 \sin{(2\pi t)}$$
where K, R and Q_0 are constants?

2. Jan 11, 2007

### Gokul43201

Staff Emeritus
TC, you know we can't help you unless you first show some effort on your part. What do you know about solving linear ODEs?

3. Jan 11, 2007

### tandoorichicken

its been a really long time since I've had to solve ODEs for any class, so I'm just using the cookie cutter of an example in my old diffeq book to help. Please correct me if I am wrong in my work. (Note: I've disregarded the constants of integration for now).

The original equation is
$$K\frac{dp(t)}{dt} + \frac{p(t)}{R} = Q_0 \sin{(2\pi t)}$$

I first solved the homogeneous equation
$$K\frac{dp(t)}{dt} + \frac{p(t)}{R} = 0$$
$$K\frac{dp}{dt} = -\frac{1}{R} p$$
$$p(t) = e^{-\frac{t}{RK}}$$

Taking $p_1 (t) = v(t)e^{-\frac{t}{RK}}$, I substituted for p in the original inhomogeneous equation and simplified:

$$p_1' = v' e^{-\frac{t}{RK}} - \frac{1}{RK} ve^{-\frac{t}{RK}$$
$$Kv' e^{-\frac{t}{RK} = Q_0 \sin{2\pi t}$$
$$v' (t) = \frac{Q_0}{K}\frac{\sin{2\pi t}}{e^{-\frac{t}{RK}}}$$

Upon integrating, one gets
$$v(t) = e^{\frac{t}{RK}} [\frac{Q_0 R\sin{2\pi t} - 2Q_0 R^2 K\pi\cos{2\pi t}}{4R^2 K^2\pi^2 + 1}]$$

Thus,
$$p(t) = v(t)e^{-\frac{t}{RK}} = \frac{Q_0 R\sin{2\pi t} - 2Q_0 R^2 K\pi\cos{2\pi t}}{4R^2 K^2\pi^2 + 1}$$

Last edited: Jan 11, 2007