Square Root Derivatives

Copyright 2008 Robert Poodiack, Norwich University

The sliders below set the coefficients for the function f(x)=(Sqrt[a (x^3)+b (x^2)+c x + d]).  You may move the sliders to pick the coefficients to be any integer between -10 and 10, inclusive.  You may eliminate a term by setting its coefficient to 0.  Mathematica will show the function you've chosen and then walk through the "4-step" process of determining its derivative by the "difference quotient" method.  In the third step, Mathematica multiplies and divides by the conjugate f(x+h)+f(x) and then cancels out Δx in the numerator and denominator.

Source code

f[x_,a_,b_,c_,d_]:=(Sqrt[a x^3+b x^2+c x+d]);
Manipulate[Grid[{{Show[Graphics[Text[Style[Row[{HoldForm[f[x]]," = ",f[x,a,b,c,d]}],Red,24]]],ImageSize->{400,75}]},{Show[Graphics[Text[Style[Column[{Row[{HoldForm[f[x+Δx]]," = ",f[x+Δx,a,b,c,d]}],Row[{" = ",Collect[f[x+Δx,a,b,c,d],x]}]}," = "],18]]],ImageSize->{750,75}]},{Show[Graphics[Text[Style[Column[{Row[{HoldForm[f[x+Δx]-f[x]]," = ",Collect[f[x+Δx,a,b,c,d],x], " - (",Collect[f[x,a,b,c,d],x],")"}],Row[{" = ",Collect[f[x+Δx,a,b,c,d]-f[x,a,b,c,d],x,Simplify]}]}," = "],18]]],ImageSize->{1000,100}]},{Show[Graphics[Text[Style[Column[{Row[{HoldForm[((f[x+Δx]-f[x])/(Δx))]," = ",((Collect[f[x+Δx,a,b,c,d]-f[x,a,b,c,d],x,Simplify])/(Δx))}],Row[{" = ",((Collect[(((f[x+Δx,a,b,c,d]))^2)-(((f[x,a,b,c,d]))^2),x+Δx,Simplify])/(Δx(Collect[f[x+Δx,a,b,c,d]+f[x,a,b,c,d],x,Simplify])))}],
Row[{" = ",((Expand[(Collect[f[x+Δx,a,b,c,d]-f[x,a,b,c,d],x,Simplify])(Collect[f[x+Δx,a,b,c,d]+f[x,a,b,c,d],x,Simplify])])/(Δx(Collect[f[x+Δx,a,b,c,d]+f[x,a,b,c,d],x,Simplify])))}],
Row[{" = ",Cancel[((Expand[(Collect[f[x+Δx,a,b,c,d]-f[x,a,b,c,d],x,Simplify])(Collect[f[x+Δx,a,b,c,d]+f[x,a,b,c,d],x,Simplify])])/(Δx(Collect[f[x+Δx,a,b,c,d]+f[x,a,b,c,d],x,Simplify])))]}]}," = "],18]]],ImageSize->{1000,200}]},{Show[Graphics[Text[Style[Row[{HoldForm[f'[x]]," = ",HoldForm[Limit[((f[x+Δx]-f[x])/(Δx)),Δx->0]]," = ",Limit[Expand[((Collect[f[x+Δx,a,b,c,d]-f[x,a,b,c,d],x])/(Δx))],Δx->0]//Expand//Together}],Blue,24]]],ImageSize->{700,75}]}},Frame->All],{{a,1},-10,10,1,Appearance->"Labeled"},{{b,1},-10,10,1,Appearance->"Labeled"},{{c,1},-10,10,1,Appearance->"Labeled"},{{d,1},-10,10,1,Appearance->"Labeled"},SaveDefinitions->True]

Double-click the pointy bracket to view the source code.