# Homework Help: Mathematically describe this function

1. Apr 15, 2015

### skrat

1. The problem statement, all variables and given/known data
This one

2. Relevant equations

ALL of them!

3. The attempt at a solution

This is a beginning to a long physics problems, but the idea is to describe the potential above as something periodical. For example:

This potential

can be written as $V(x)=\sum _n [H(x-na)-H(x-na-\frac a 3)]$ if $H(x)$ is Heaviside function.

Ok, back to original problem. I have no idea how to do it. I tried to work with periodic absolute values, but, it doesn't work out the way it should. Any ideas?

2. Apr 15, 2015

### robphy

Can you use a floor function?

3. Apr 15, 2015

### rhino1000

Each rising/falling half interval is .5a long. So. we want H(x-0)*(2*U/a)x-2(H(x-.5a)*(2*U/a)x+2H(x-a)*(2*U/a)x-... This way the second heaviside function cancels the first when it comes into action at x=.5a, and the third cancels the second when it comes into action at x=a, etc. The U/(.5a) is the slope of the line y = U/(.5a)*x+b. Basically we want the slope to always have the value of either U/(.5a) or -U/(.5a). So if the slope before X=k is U/(.5a), then we have to subtract 2(U/(.5a)) to get a slope of -U/(.5a). For convenience, I wrote U/(.5a)=2(U/a) in the following discussion

So this would be written (2*U/a)*x + ∑ 2*(-1)^(i+1)*H(x-(.5i*a-.5a))*(2*U/a)*x

Where the summation is from i=2 to infinity

(or if the picture isn't supposed to imply that the function works for all x, then from i=2 to n, where n is the number of ups+downs there are total, so I guess 7 in this case. But then we would have to add to the summation one last function in order to cancel out the 8th heaviside function. So we would just + H(x-(.5*9*a-.5a))*(U/a)*x*(-1)^(i+1) )

This would work assuming that the heaviside function H(x-k) makes the function equal to 1 when x>= k. But if not, then oops, I forgot what the Heaviside function is.

Edit: fixed.

Last edited: Apr 15, 2015
4. Apr 15, 2015

### skrat

I could, but I don't want to because I have never used or seen them in my life. (I later have to integrate this function, and I have no idea how would I do that with floor function)

Hmmmm... Maybe I'm writing it wrong but this is what mathematica gives me for $n=3$ if $U=100$ and $a=1$

5. Apr 15, 2015

### robphy

6. Apr 15, 2015

### Ray Vickson

Let for $u < v$ let $I_{[u,v]}(x)$ be the indicator function for the interval $[u,v]$, defined as
$$I_{[u,v]}(x) = \begin{cases} 1, & \text{if} \; x \in [u,v] \\ 0, & \text{if} \; x \not\in [u,v] \end{cases}$$
Then (assuming that one of the troughs is at $(0,0)$) your basic building block is $f(x) =100\, |\,2x/a\,| \, I_{[-a/2,a/2]}(x)$. You can sum translations of that to get the whole function $F(x)$:
$$F(x) = \sum_{n=-\infty}^{\infty} f(x - na)$$
If you don't like the indicator function, but would rather use the Heaviside function, you can write it in two ways:
$$(1)\; I_{[u,v]}(x) = H(x-u)H(v-x) \\ (2)\; I_{[u,v]}(x) = H(x-u) - H(x-v)$$

7. Apr 15, 2015

### SammyS

Staff Emeritus
8. Apr 15, 2015

### rhino1000

This should work.

T = (2*100)*x/a+sum from i=2 to i=10 of (2*(-1)^(i+1)*Heaviside(x-.5*i+.5)*(2*100)*(x-.5*i)/a-200*Heaviside(x-.5*i-.5)*(-1)^i) -200*Heaviside(x-.5)+200*Heaviside(x-1)

Last edited: Apr 15, 2015
9. Apr 15, 2015

### SteamKing

Staff Emeritus
You can't do a Fourier Series for a sawtooth wave? It's periodic and there should be an example somewhere showing what the result is. You may only need either sines or cosines in the Fourier Series, depending on the time variable for the sawtooth wave.

10. Apr 26, 2015

### manifold

try this function :

Last edited: Apr 26, 2015