# Vibrating Spring (Solving nonhomogeneous equations)

#### ptyindian

##### New member
Hello! I need some help with a differential equations problem. The question is:

• (w/g)y" + ky' + cy = F(t)

w: the weight of the object attached to the spring
g: 32
k: damping factor
c: spring constant
F(t): the external force on the system

A 64 pound weight is attached to the end of the spring. After reaching the equilibrium position the spring is stretched one foot beyond the equilibrium position. The weight is then released and as it is released it is struck a downward blow giving it an initial velocity of 2 ft/sec.

Take the moment the weight is released and struck as time zero, with time t measured in seconds. At time zero, a periodic external force given by F(t) = (1/2)cos(4t) pounds begins acting on the system.

Consider the damping factor to be negligible, i.e., take k to be zero. The spring constant is 32. Find the function giving y, the position of the bottom of the weight as a function of time given in seconds.

If someone could help me with this problem, I would really appreciate it. Thank you!

#### daon

##### Senior Member
ptyindian said:
Hello! I need some help with a differential equations problem. The question is:

• (w/g)y" + ky' + cy = F(t)

w: the weight of the object attached to the spring
g: 32
k: damping factor
c: spring constant
F(t): the external force on the system

A 64 pound weight is attached to the end of the spring. After reaching the equilibrium position the spring is stretched one foot beyond the equilibrium position. The weight is then released and as it is released it is struck a downward blow giving it an initial velocity of 2 ft/sec.

Take the moment the weight is released and struck as time zero, with time t measured in seconds. At time zero, a periodic external force given by F(t) = (1/2)cos(4t) pounds begins acting on the system.

Consider the damping factor to be negligible, i.e., take k to be zero. The spring constant is 32. Find the function giving y, the position of the bottom of the weight as a function of time given in seconds.

If someone could help me with this problem, I would really appreciate it. Thank you!
$$\displaystyle 2y'' + 32y = \frac{1}{2}cos(4t)$$

First, solve:

$$\displaystyle \frac{64}{32}y'' + 32y = 0$$

.....................
$$\displaystyle 2 \lambda ^2 + 32 = 0 \Rightarrow \lambda = +/- 4i$$

$$\displaystyle y_h = C_1Cos(4t) + C_2Sin(4t)$$
.....................

Now, solve:

$$\displaystyle 2y'' + 32y = \frac{1}{2}cos(4t)$$
.....................

From out homogeneous solution, we see that $$\displaystyle y_1 = Cos(4t) and y_2=Sin(4t)$$. Given these, we need to take the determinant:
Code:
W =  | y1  y2  |
| y1' y2' |
So, W = Cos(4t)*4Cos(4t) - (-4Sin(4t))Sin(4t) = 4

Then, our $$\displaystyle y_p = -y_1 \int \frac{y_2F(t)}{W} dx + y_2 \int \frac{y_1F(t)}{W} dx$$

Or:

$$\displaystyle y_p = -Cos(4t) \int \frac{Sin(4t)\frac{1}{2}Cos(4t)}{4} dt + Sin(4t) \int \frac{Cos(4t)\frac{1}{2}Cos(4t)}{4} dt$$

$$\displaystyle y_p = \frac{-Cos(4t)}{8} \int Sin(4t)Cos(4t) dt + \frac{Sin(4t)}{8} \int Cos^2(4t) dt$$

$$\displaystyle y_p = \frac{Cos^3(4t)}{64} + \frac{Sin^2(4t)Cos(4t) + 4t}{64}= \frac{Cos^3(4t) + Sin^2(4t)Cos(4t) + 4t}{64}$$

$$\displaystyle y_p = \frac{Cos(4t)[Cos^2(4t) + Sin^2(4t)] + 4t}{64} = \frac{Cos(4t) + 4t}{64}$$
............................

Now, $$\displaystyle y(t) = y_h + y_p \\ y(t) = C_1Cos(4t) + C_2Sin(4t) + \frac{Cos(4t) + 4t}{64}$$

-Daon