# Rational Chebyshev Collocation Method For Damped Harmonic Oscilator

Hello everyone.

I'm currently trying to solve the damped harmonic oscillator with a pseudospectral method using a Rational Chebyshev basis

$$\frac{d^2x}{dt^2}+3\frac{dx}{dt}+x=0, \\ x(t)=\sum_{n=0}^N TL_n(t), \\ x(0)=3, \\ \frac{dx}{dt}=0.$$

I'm using for reference the book "Chebyshev and Fourier Spectral Methods", from John P. Boyd. In this book it is said that if the solution for my ODE converges to zero (or a finite value) as t goes to infinity it can be approximated as a series of Rational Chebyshev functions. I had success in applying this method to solve

$$\frac{d^2x}{dt^2}-x=0, \\ x(0)=3, \\ x(\inf)=0.$$

But i'm failing in the problem first presented.

Does anyone know if this problem is made to be solved with a Fourier basis instead of Chebyshev? I know that for the Simple Harmonic Oscillator it happens (because of the boundary behavorial condition of oscillation).

## Answers and Replies

You are making this problem too difficult. The characteristic polynomial of your d.e. is $$\lambda^2 + 3\lambda +1=0\\ \lambda_1=\frac{-3}{2}+\frac{\sqrt{5}}{2}\\ \lambda_2=\frac{-3}{2}-\frac{\sqrt{5}}{2}$$Assume a solution in the form$$x(t)=Ae^{\lambda_1 t} +Be^{\lambda_2 t}$$where A and B are constants. From your initial conditions you can solve for A and B. See http://tutorial.math.lamar.edu/Classes/DE/IntroSecondOrder.aspx

You are making this problem too difficult. The characteristic polynomial of your d.e. is $$\lambda^2 + 3\lambda +1=0\\ \lambda_1=\frac{-3}{2}+\frac{\sqrt{5}}{2}\\ \lambda_2=\frac{-3}{2}-\frac{\sqrt{5}}{2}$$Assume a solution in the form$$x(t)=Ae^{\lambda_1 t} +Be^{\lambda_2 t}$$where A and B are constants. From your initial conditions you can solve for A and B. See http://tutorial.math.lamar.edu/Classes/DE/IntroSecondOrder.aspx
I took a simple problem which let me know the analytical solution because I want to use this solution to compare with the numerical one, for practicing proposes.