# Thread:

1. ## Mass on a spring problem

Can someone explain how to solve this? Cheers.

2. You will need to solve the homogeneous problem
$\frac{d^2x}{dt^2} + w^2x = 0$
Then you will find a particular solution you can do this using the method of undetermined coefficients. Then you add the two solutions together.

3. Can you explain how to find the C.F.? Apparently its x=cos(wt)+sin(wt) ? I don't know how they got that answer though.

4. Okay, I will go through the particular solution first. I will let $x_p$ denote the particular solution. Since the nonhomogeneous part is a trigonometric function we will let the particular solution be of the form $x_p = A\sin \gamma t + B\cos \gamma t$. Now we must determine the coefficients $A,B$. To do this we will plug $x_p$ back into the original DEQ.
$x''_p = -\gamma^2 A \sin \gamma t - \gamma^2 B \cos \gamma t$
and so
$-\gamma^2 A \sin \gamma t - \gamma^2 B \cos \gamma t + w^2 \cdot \left( A\sin \gamma t + B\cos \gamma t \right) = \cos \gamma t$
$\left(w^2 -\gamma^2\right) A \sin \gamma t + \left(w^2 - \gamma^2\right) B \cos \gamma t = \cos \gamma t$.
Thus we have
$\left(w^2 - \gamma^2\right)A \sin \gamma t = 0$
and
$\left(w^2 - \gamma^2\right)B \cos\gamma t = \cos \gamma t$.
Therefore, we have
$\left(w^2 - \gamma^2\right)A = 0$
and
$\left(w^2 - \gamma^2\right)B = 1$,
so
$A = 0$
$B = \frac{1}{w^2 - \gamma^2}$.
Finally, we see that our particular solution is
$x_p = \frac{1}{w^2 - \gamma^2} \cos \gamma t$.

Deleted mistake see following post.

5. Sorry I made a mistake. The homogeneous solution is wrong. The solution of the characteristic equation is not $\lambda = \pm w$. The solution is $\lambda = \pm w i$.
Therefore, the homogeneous solution is of the form
$x_h = C_1\cos w t + C_2 \sin w t$.
Finally, the general solution should be
$x(t) = C_1\cos w t + C_2 \sin w t + \frac{1}{w^2 - \gamma^2} \cos \gamma t$.
To determine the constants $C_1,C_2$ we must have initial conditions.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 20, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9019896388053894, "perplexity_flag": "head"}