Piecewise Function

intervade

New member
Joined
Apr 6, 2009
Messages
49
I have this lovely function

f(x) = { 0 if x < 0
x if 0 <= x <= 1
2-x if 1 < x <= 2
0 x > 2 }

so it stays at zero and as it approaches x = 0 it gets a slight curve.

now.. g(x) = the integral from 0 to x of f(t)dt.

I need to find a expression for g(x) similar to the one for f(x). It needs to be piecewise defined. I'm not even sure where to start to be honest. Help would be much appreciated!
 
intervade said:
I have this lovely function

f(x) = { 0 if x < 0
x if 0 <= x <= 1
2-x if 1 < x <= 2
0 x > 2 }

so it stays at zero and as it approaches x = 0 it gets a slight curve.

now.. g(x) = the integral from 0 to x of f(t)dt.

I need to find a expression for g(x) similar to the one for f(x). It needs to be piecewise defined. I'm not even sure where to start to be honest. Help would be much appreciated!

Integrate it piecewise.

so g(x) = 0 for x?0

and

g(x) = x^2/2 for 0?x?1


and continue....
 
Hello, intervade!

Did you make a sketch?


\(\displaystyle f(x) \;=\;\left\{\begin{array}{ccc} 0 && x < 0 \\ x && 0 \leq x \leq 1 \\ 2-x && 1 < x \leq 2 \\09 && x > 2 \end{array}\)

\(\displaystyle \text{Find: }\;g(x) \;=\;\int^x_0 f(t)\,dt\)

The graph looks like this:


Code:
            |
           1+       *
            |     *   *
            |   *       *
            | *           *
  - * - * - * - - - - - - - * - * - * - -
            |       1       2
            |

\(\displaystyle g(x)\text{ is the area under the graph (and above the }x\text{axis).}\)
It too will be a piecewise function.

\(\displaystyle \text{If }0 \leq x \leq 1: \;\;g(x) \;=\;\int^x_0 t\,dt\)

\(\displaystyle \text{If }1 < x \leq 2: \;\; g(x) \;=\;\frac{1}{2} + \int^x_1(2-t)\,dt\)

\(\displaystyle \text{If }x > 2:\;\;g(x) \:=\:1\)

 
Ok, I think I got it. But I'm confused why the third part would be g(x) = 1, and what about the first part, would that ALSO be g(x) = 1? Also, where did your 1/2 come from?

this is what I came up with.

g(x) { 0 if x < 0,
t^2/2 if 0 <= x <=1
2t-t^2/2 if 1 < x <= 2
0 if x > 2 }

I know where is flaws because right after 2, I need to go back down to 0 which seems to make it discontinuous?
 
intervade said:
Ok, I think I got it. But I'm confused why the third part would be g(x) = 1, and what about the first part, would that ALSO be g(x) = 1? Also, where did your 1/2 come from?

this is what I came up with.

g(x) { 0 if x < 0,
t^2/2 if 0 <= x <=1
2t-t^2/2 if 1 < x <= 2
0 if x > 2 }

I know where is flaws because right after 2, I need to go back down to 0 which seems to make it discontinuous?

g(x) is defined as integration whose lower limit is always '0'.
 
Top