# Exercici 07.7

## apartat a)

kill(all)$

y(x):=+sqrt(a*x + b);

x0=x0:4.21$     y0=y0:4.21$     
Eq1:y0=sqrt(a*x0 + b);      Eq1b:y0^2=a*x0 + b;

diff(y(x), x);

Dy(x):=a/(2*sqrt(a*x+b));

Eq2:Dy(x0)=1;       Eq2b:(Dy(x0))^2=1;

solve([Eq1b, Eq2b], [a,b]), numer;

a1=a1:-8.4200;                      b1=b1:53.1723;
y1(x):=+sqrt(a1*x + b1);        yT(x):=x;

wxplot2d([y1(x), yT(x)], [x, 0, 8] ,
[gnuplot_preamble, "set size ratio 1; set grid"] , [nticks, 300]    )$

a2=a2:8.4200;                       b2=b2:-17.7241;
y2(x):=+sqrt(a2*x + b2);        yT(x):=x;

wxplot2d([y2(x), yT(x)], [x, 0, 8] ,
[gnuplot_preamble, "set size ratio 1; set grid"] , [nticks, 300]    )$

## apartat b)

kill(all)$

y(x):=A*x^2 + B*x + C;
diff(y(x), x);

Dy(x):=2*A*x + B;
m1=m1:Dy((a+b)/2);

y(a);       y(b);
m2=m2:(y(b) - y(a))/(b-a);

ratsimp(%);