I want to calculate and draw the phase space trajectory of this damped harmonic oscillator:
$$\ddot{x}+\gamma\,\dot{x}+\omega^2x=0$$
for the two cases $\gamma=2\omega$ and $\gamma=\omega$.
I'm really stuck with this and have no idea what to do... I've found stuff on google about it but am struggling to follow.
A quick orientation can be gotten by using a WolframAlpha query.
In your case:
solve x'' + 2 w x' + w^2 x = 0(link)and
solve x'' + w x' + w^2 x = 0(link)It will give you algebraic solutions, which you could use for your $(x, \dot{x})$ plot with other software (mathematica example) (octave example).
And it provides some sample plots for some initial conditions it chooses which might give you an idea what is going on.