# How do I write this interesting piecewise function?

• JosephK
In summary, the Homework Statement asks for the governing differential equation and position functions for a 32 pound object attached to the end of a spring with a spring constant of 1 and a forcing function that yields a constant velocity in the direction of motion. The velocity changes sign periodically and the forcing function is piecewise.
JosephK

## Homework Statement

[URL]http://www2.seminolestate.edu/lvosbury/images/VibSpringAnNS.gif[/URL]
Find the governing differential equation and position functions for a 32 pound object attached to the end of a spring with a spring constant of 1 and a forcing function that yields a constant velocity in the direction of motion. This velocity changes sign periodically. The forcing function is piecewise. The object is pulled down until the spring is stretched to 5 feet below its equilibrium position and then the object is released with an initial velocity of -1 ft/sec and the forcing function produces a constant velocity of -1 ft/sec. After the object has traveled 10 feet it is impeded and reverses direction with an initial velocity at that point of 1 ft/sec. and the forcing function changes to produce a constant velocity of 1 ft/sec. This behavior continues indefinitely.

## The Attempt at a Solution

I am interested in only finding the piecewise function.

I drew the graph.

I think I can use a calculator function such as frac(x) or int(x).

I wrote a piecewise (unfinished) function that I believe can be simplified.

-t represents line with negative 1 slope. t represents line with positive 1 slope.
I wrote (1)^n * t for alternating t.

To write inequalities, 5 + 10n.

Last edited by a moderator:
Your forcing functio is periodic with period 20. The simplest thing to do would be to solve it as two separate problems for -5< t< 5 and then for 5< t< 15.

Your piecewise description of your forcing function is not correct. For the period from -5 to 15 your formula would be:

f(x) = x, -5<x<5
f(x) = 10 - x, 5 < x < 15

You can write this portion of f(x) using the unit step function u(x):

f(x) = x + (10-2x)u(x-5) for -5 < x < 15

and call F(x) the periodic extension of f(x) with period 20. Then you could solve the DE using LaPlace transforms, making use of the expression for the LT of a periodic function.

f(t) = t, -5<t<5
f(t) = 10 - t, 5 < t < 15

I think I can find the Laplace transform of this periodic function.

JosephK said:
f(t) = t, -5<t<5
f(t) = 10 - t, 5 < t < 15

I think I can find the Laplace transform of this periodic function.

Since your piecewise function is actually not defined for t < 0, you should use a formula on (0,20) to take the LaPlace transform. I think it is:

f(t) = t -10u(t-5) - 10u(t-15) on (0,20)

but you can check to be sure.

JosephK said:

## Homework Statement

[URL]http://www2.seminolestate.edu/lvosbury/images/VibSpringAnNS.gif[/URL]
Find the governing differential equation and position functions for a 32 pound object attached to the end of a spring with a spring constant of 1 and a forcing function that yields a constant velocity in the direction of motion. This velocity changes sign periodically. The forcing function is piecewise. The object is pulled down until the spring is stretched to 5 feet below its equilibrium position and then the object is released with an initial velocity of -1 ft/sec and the forcing function produces a constant velocity of -1 ft/sec. After the object has traveled 10 feet it is impeded and reverses direction with an initial velocity at that point of 1 ft/sec. and the forcing function changes to produce a constant velocity of 1 ft/sec. This behavior continues indefinitely.

## The Attempt at a Solution

I am interested in only finding the piecewise function.

I drew the graph.

I think I can use a calculator function such as frac(x) or int(x).

I wrote a piecewise (unfinished) function that I believe can be simplified.

-t represents line with negative 1 slope. t represents line with positive 1 slope.
I wrote (1)^n * t for alternating t.

To write inequalities, 5 + 10n.

One way of representing this that comes to mind is to use a x arcsin(sin(bx)) for constants a and b. From your drawing let a = A and b = pi/10 and hopefully that should give you what you need.

Last edited by a moderator:

## 1. How do I format a piecewise function in my writing?

To format a piecewise function, use the piecewise environment in LaTeX or the piecewise function in programming languages like Python or MATLAB. This will allow you to define the different cases and their corresponding equations in a clear and organized way.

## 2. How do I determine the domain and range of a piecewise function?

The domain and range of a piecewise function are determined by the domains and ranges of its individual cases. You will need to consider each case separately and determine the domain and range based on the restrictions and conditions given in each case.

## 3. How do I make a piecewise function continuous at a specific point?

To make a piecewise function continuous at a specific point, you will need to ensure that the value of the function at that point is equal to the limit of the function from both sides. This may involve adjusting the equations of the individual cases or adding additional cases to cover the desired point.

## 4. Can I use a piecewise function to represent real-life situations?

Yes, piecewise functions can be used to model real-life situations where different conditions or circumstances may result in different equations being used. For example, a piecewise function could be used to model the price of a product based on the quantity purchased, with different equations for different price ranges.

## 5. How do I graph a piecewise function?

To graph a piecewise function, first graph each individual case separately, then combine the graphs by plotting the appropriate points and connecting them with lines or curves. You may also need to add labels and descriptions to make the graph easier to read and understand.

Replies
30
Views
2K
Replies
2
Views
4K
Replies
2
Views
2K
Replies
1
Views
4K
Replies
1
Views
2K
Replies
3
Views
2K
Replies
17
Views
2K
Replies
236
Views
10K
Replies
4
Views
1K
Replies
2
Views
2K