Question 1105410
{{{matrix(1,3,
f(x),
""="",
system( matrix(3,3, 0,if,x<0,
                    cx,if,0<=x<=2,
                     0,if,x>2)))}}}
</pre>
a) Get the value of constant c.
<pre>
Since f(2) = c(2) = 2c

f(x) has the graph:

{{{drawing(400,5600/19,-.9,2.9,-.9,1.9,
red(line(-5,0,0,0),line(0,0,1.95,.975),line(2.05,0,5,0)),
line(0,0,1.95,0), line(0,-5,0,5), red(circle(2,0,.05),

circle(2,1,.05),
circle(2,1,.04),
circle(2,1,.03),
circle(2,1,.02),
circle(2,1,.01),
circle(2,1,.005)),
green(
line(2,.05,2,.1),line(2,.15,2,.2),line(2,.25,2,.3),
line(2,.35,2,.4),line(2,.45,2,.5), line(2,.55,2,.6),
line(2,.65,2,.7),line(2,.75,2,.8), line(2,.85,2,.9)),



locate(2.05,1.1,(matrix(1,3,2,",",2c)))


 )}}}

Since this is a probability density function, the area between
the graph (in red) and the x-axis is 1.  Since the entire area 
is the area of the right triangle, we just use the formula for 
the area of a triangle:

{{{matrix(1,17,
A,"",""="","",1/2,"×",base,"×",height,"",""="","",expr(1/2)*2*2c,"",""="","",c)}}} 
So since the area A of the triangle is 1, 

{{{matrix(1,17,
A,"",""="","",1/2,"×",base,"×",height,"",""="","",expr(1/2)*2*2c,"",""="","",2c)}}} 

{{{matrix(1,3,1,""="",2c)}}}

{{{matrix(1,3,1/2,""="",c)}}}

And therefore

{{{matrix(1,3,
f(x),
""="",
system( matrix(3,3, 0,if,x<0,
                    expr(1/2)x,if,0<=x<=2,
                     0,if,x>2)))}}}

So the point (2,2c) is the point (2,1), 
and the graph of f(x) is

{{{drawing(400,5600/19,-.9,2.9,-.9,1.9,
red(line(-5,0,0,0),line(0,0,1.95,.975),line(2.05,0,5,0)),
line(0,0,1.95,0), line(0,-5,0,5), red(circle(2,0,.05),
line(0,.01,1.95,.01),line(0,-.01,1.95,-.01),
circle(2,1,.05),
circle(2,1,.04),
circle(2,1,.03),
circle(2,1,.02),
circle(2,1,.01),
circle(2,1,.005)),
green(
line(2,.05,2,.1),line(2,.15,2,.2),line(2,.25,2,.3),
line(2,.35,2,.4),line(2,.45,2,.5), line(2,.55,2,.6),
line(2,.65,2,.7),line(2,.75,2,.8), line(2,.85,2,.9)),

graph(400,5600/19,-.9,2.9,-.9,1.9),

locate(2.05,1.1,"(2,1)")

 )}}}
</pre>
b) Get the cumulative distribution function F (x).
<pre>
{{{matrix(1,30,
F(x),
"",
""="",
"",
int(f(t)^"",dt,-infinity,infinity),
"",
""="",
"",
int(expr(1/2)t,dt,0,x),
"",
""="",
"",
expr(1/2)int(t^"",dt,0,x),
"",
""="",
expr(1/2)(t^2/2^""),
matrix(3,2,"|",x,"|","","|",0),
"",
""="",
"",
t^2/4^"",
matrix(3,2,"|",x,"|","","|",0),
"",
""="",
"",
x^2/4^""-0^2/4^"",
"",
""="",
"",
x^2/4^""
)}}}
</pre>
c) Get P (1/4 < X <3/4). 
<pre>
{{{F(3/4)-F(1/4)}}}{{{""=""}}}{{{F(0.75)-F(0.25)}}}{{{""=""}}}{{{(0.75)^2/4^""-(0.25)^2/4^""}}}{{{""=""}}}{{{0.125}}}{{{""=""}}}{{{1/8}}}

Edwin</pre>