# solving this 2nd order ODE

Could someone help me with this problem?

I have a second order ODE as such:

$$\frac{d^2x}{dt^2}+\beta \frac{dx}{dt} = f(t)$$

I am not sure how to solve this linear ODE, was hoping someone could help.

does this look right?

$$e^{\beta t} \frac{dx}{dt}+\beta e^{\beta t}x=e^{\beta t} g(t)$$

$$\frac{d}{dt}( xe^{\beta t} )= e^{\beta t} g(t)$$

$$xe^{\beta t} = \int e^{\beta t} g(t)$$

$$x(t) = \frac{\int e^{\beta t} g(t)}{e^{\beta t}}$$

• Is $\beta$ a constant? If so, this is a linear DE. – Michael Albanese Dec 8 '14 at 17:26
• Yes $\beta$ is a constant – Jackson Hart Dec 8 '14 at 17:26
• There are few suspicious moments in your solution: 1) you've forgot to define $g(t)$ (@David-Cardozo pointed that several times); 2) your $x(t)$ in the beginning and at the end definitely aren't the same functions; 3) so you have to fix the transition from initial second-order linear ODE to the first-order linear ODE. – Evgeny Dec 9 '14 at 7:41

So for another answer, the problem to solve is: $$\frac{d^2x}{dt^2}+\beta \frac{dx}{dt} = f(t)$$ let us use the substituion, $r(t) = \dfrac{dx}{dt}$ so that and $\dfrac{dr}{dt} = \dfrac{d}{dt} \dfrac{dx}{dt} = \dfrac{d^2x}{dt^2}$. We have then: $$\dfrac{dr}{dt} + \beta r = f(t)$$ and this is a first order ode that can be solved using the integration factor method

• Isnt this what I did in the Question? – Jackson Hart Dec 8 '14 at 18:34
• Integration factor $\mu(t) = e^{ \int \beta dt}$. and the solution will be $r(t) = \dfrac{ \int \mu(t) f(t) dt }{\mu(t)}$. – David Cardozo Dec 8 '14 at 18:35
• Right, look at the end of the question statement. I did this. What is wrong with it? – Jackson Hart Dec 8 '14 at 18:36
• In your question you assumed the solution, here we don't assume any special form of the solution. – David Cardozo Dec 8 '14 at 18:37
• How did I assume solution? I used integrating factor – Jackson Hart Dec 8 '14 at 18:37

Integrate once and we have

$$\frac{dx}{dt} + \beta x = \int_{t_0}^t f(t') \ dt'$$

Call the RHS $g(t)$. Now, do you know how to handle an equation of the sort

$$\frac{dx}{dt} + \beta x = g(t)$$ ?

• I'm trying to figure out the proper method. Integrating factor maybe? – Jackson Hart Dec 8 '14 at 17:32
• Yes, an integrating factor – Simon S Dec 8 '14 at 17:37
• What difference I could suggest is to use $p =\dot{x}$ first and do the integrating factor first. But it's taste rather than any better :). +1 – Chinny84 Dec 8 '14 at 17:39
• p(t)=$\beta$ right? – Jackson Hart Dec 8 '14 at 17:44
• I don't know what notation you're using. But if $p(t)$ is the function that is in front of $x(t)$ then clearly yes. If $p(t)$ is the integrating factor itself then no. – Simon S Dec 8 '14 at 17:45

To proceed we will first solve the associated homogeneous equation:

$$\frac{d^2x_h}{dt^2}+\beta \frac{dx_h}{dt} = 0$$

of course the solutions will be: $$x_h(t) = c_1 \cdot e^{\lambda_1}t + c_2 \cdot e^{\lambda_2}t$$ Where $\lambda_{1,2}$ are the solutions of the second degree equation $$\lambda^2 + \beta \cdot \lambda = 0$$ Then, once you have $x_h$, you then use variation of parameters (or any annihilator approach) to find a particular (only one) $x_p$ that solves: $$\frac{d^2x_p}{dt^2}+\beta \frac{dx_p}{dt} = f(t)$$ and the general solution for: $$\frac{d^2x}{dt^2}+\beta \frac{dx}{dt} = f(t)$$ is $$x(t) = x_h(t) + x_p(t)$$

• DO you see a problem with the integration factor method? – Jackson Hart Dec 8 '14 at 18:19
• Expanding on the second degree equation we have $\lambda ( \lambda + \beta) = 0$, so you have $\lambda_1 = 0$ and $\lambda_2 = -\beta$, so your is $x_h = c_1 + c_2 \cdot e^{-\beta t}$ and the rest will be depending on the $f(t)$ and the method of anihilator or variation of parameters. – David Cardozo Dec 8 '14 at 18:22
• Right, but do you see my solution in original question? What is wrong with that solution? – Jackson Hart Dec 8 '14 at 18:23
• Well you are assuming that the solution is of the form $x(t) = e^{\beta t}$, but observe the solution is of the form $x(t) = c_1 + c_2 e^{-\beta t} + x_p(t)$, so that you need to change your form of solution otherwise you will never get the answer. – David Cardozo Dec 8 '14 at 18:26
• So you are saying the method is incorrect? Im not sure how to change the form to match what you have. – Jackson Hart Dec 8 '14 at 18:27