**Problem**

A 1 kg object is attached to spring that would stretch the spring 1 m by a force of 1 N. There is no damping in the system and a forcing function of the form

is attached to the object and the system will experience resonance. If the object is initially at the equilibrium position, and at rest, determine the displacement at any time .

**Solution**

The first thing we need to do is find the spring constant .

With no damping, the differential equation to solve for this problem follows the profile

- .

Therefore,

- .

**Solving the complementary solution**

Solve the second-order differential equation .

The characteristic equation is .

Thus the roots are pure-imaginary: .

Therefore the complementary solution is

- .

**Solving the particular solution**

Let's solve the particular solution using undetermined coefficients.

For this type of differential equation, the ansatz (educated guess) is

- .

Taking the two derivatives yield

- .

Now substituting the derivatives into the original differential equation yields

- .

Therefore, and , which means

- .

**Final solution**

The complete solution is :

- .

Since the initial position is at equilibrium

- .

This means .

The derivative of the complete solution is

- .

Since the initial velocity is at rest

- .

This means .

Consequently the solution of this scenario is just

- .