Question: Air minimal between 2 curves [0,1], Answer check

For which value of c is the area between f(x) and g(x) minimal?  f(x) and g(x) are both continuous   ( in the interval [0,1] )        

> g := x-> piecewise(0<=x and x<=c, m1*x+b1, c<x and x<=1, m2*x+b2);

f := x-> x^3;

 

 

> A := int(f(x)-g(x), x=0..1):

dA := diff(A, c) assuming c > 0, c < 1:

solve(dA, {c});

Answer : c = -(b1-b2)/(m1-m2)

Is this right?

 

 


 

 

Please Wait...