# Sketch the graph of a continuous function

• Dec 12th 2009, 08:00 AM
ughintegrals
Sketch the graph of a continuous function
Hi again I'm tackling a question that is very likely to be on a future exam, and I'm a bit stuck.

The question:

g(x){ 0 if x<2
2 if 2<x<4
-1 if x>4

Sketch the graph of a continuous function f(x) knowing that f(0)=1, and f'(x) = g(x)

Graphing g(x) is not a problem, but understanding how to formulate a seperate function with just the info given is a major roadblock.

• Dec 12th 2009, 09:16 AM
Jester
Quote:

Originally Posted by ughintegrals
Hi again I'm tackling a question that is very likely to be on a future exam, and I'm a bit stuck.

The question:

g(x){ 0 if x<2
2 if 2<x<4
-1 if x>4

Sketch the graph of a continuous function f(x) knowing that f(0)=1, and f'(x) = g(x)

Graphing g(x) is not a problem, but understanding how to formulate a seperate function with just the info given is a major roadblock.

If $
g(x) = \left\{
\begin{array}{cl}
0 & \text{if}\; x < 2\\
2 & \text{if}\; 2 < x < 4\\
-1 & \text{if}\; x > 4
\end{array}\right.
$

then

$
f(x) = \left\{
\begin{array}{cl}
c_1 & \text{if}\; x \le 2\\
2x + c_2 & \text{if}\; 2 < x \le 4\\
-x + c_3 & \text{if}\; x > 4
\end{array}\right.
$
.

Then use the fact that $f(0) = 1$ (this gives you $c_1$) and that $f(x)$ is continuous at $x = 2$ and $x = 4$ (this gives the remaining constants.)
• Dec 12th 2009, 09:50 AM
ughintegrals
ugh, im almost there.

c1 was no sweat, but how am i supposed to use the x= 2 and x = 4 to solve the remaining constants? plug 2 into the 2x+c, or equate it to 2? or neither?

im just a bit stuck there....sorry for being difficult.