Solving a differential equation that includes cosine

42 Views Asked by At

Anyone interested in coming up with a concise equation for $u(\tau)$ given the equation for its derivative below?

\begin{align} \frac{du}{d\tau}=-\sigma u + S\bigg(1+B\cos(\tau)\bigg) \end{align}

1

There are 1 best solutions below

7
On BEST ANSWER

Here I will assume that $\sigma, S, B$ are all constants as you've not stated otherwise.

This is a fairly simple ODE to solve as it's first order, and it's linear. Because it's linear it has a superposition principle which we can use to get the solution in the form of

\begin{equation} u(\tau) = u_c(\tau) + u_p(\tau). \end{equation}

Where $u_c(\tau), u_p(\tau)$ are the complementary and particular functions respectively.

To get the complementary function we solve the homogeneous equation, we can do this by guessing an exponential of the form: $\alpha \exp(\lambda \tau)$ (where $\alpha$ is a constant), this yields $\lambda = - \sigma$, such that \begin{equation} u_c(\tau) = \alpha e^{-\sigma \tau}. \end{equation}

Now to find the particular function we guess $u_p(\tau) = \beta + \gamma \cos(\tau) + \varepsilon \sin(\tau)$ for $\beta, \gamma, \varepsilon$ all constants. Substituting this into the ODE gives three equations which can be solved for each of these constants. Giving the final form of the particular function as

\begin{equation} u_p(\tau) = \frac{S}{\sigma (1 + \sigma^2)} \left[ 1 + \sigma^2 + \sigma^2 B \cos(\tau) + \sigma B \sin(\tau) \right]. \end{equation}

Now, we just add these two solutions together to give the final solution as \begin{equation} u(\tau) = \alpha e^{-\sigma \tau} + \frac{S}{\sigma (1 + \sigma^2)} \left[ 1 + \sigma^2 + \sigma^2 B \cos(\tau) + \sigma B \sin(\tau) \right]. \end{equation}