Differentiation af ln.
Figuren illustrerer det forhold, at den afledede funktion til $ln(x)$ er $\large\frac{1}{x}$.
Du kan flytte det røde punkt $(x, ln(x))$.
Figure figure1 = Position [0,0] Size[x,y/2-2] Origin[x/12,y/4] Unit x/12 Color "white";
Figure figure2 = Position [0,y/2+2] Size[x,y/2-2] Origin[x/12,y*3/4] Unit x/12 Color "white";
Function f( Number x ) = ln(x);
Function f_deriv( Number x ) = if x > 0 then 1/x endif;
Use figure1;
Grid grid1 = Color "#8080ff";
Line x_akse1 = Start [-1,0] Dir [12,0] Vector Size 1 Color "black";
Line y_akse1 = Start [0,-3] Dir [0,6] Vector Size 1 Color "black";
Graph graph_f = f(x) Size 1.5 Color "black";
Point P = [1,0] Slider graph_f Size 2.5 Color "red";
Line a = Start P Dir [1,0] Size 1.5 Color "black";
Line b = Start P+[1,0] Dir [0,f_deriv(P:0)] Size 1.5 Color "red";
Line c = Start P Dir [1,f_deriv(P:0)] Size 1.5 Color "black";
Line b1 = Start P Dir [0,1] Infinite Size 0.5 Color "#202020";
Tex t1 = "f(x) = ln(x)" Offset [80,5] Color "black";
Tex t1_ = "x" Offset [580,125] Color "black";
Use figure2;
Grid grid2 = Color "#8080ff";
Line x_akse2 = Start [-1,0] Dir [12,0] Vector Size 1 Color "black";
Line y_akse2 = Start [0,-3] Dir [0,6] Vector Size 1 Color "black";
Graph graph_f_deriv = f_deriv(x) Size 1.5 Color "black";
Line d1 = Start P Dir [0,1] Infinite Size 0.5 Color "#202020";
Line d = Start [P:0,0] Dir [0,f_deriv(P:0)] Size 1.5 Color "red";
Tex t2 = "f’(x) = 1/x" Offset [80,305] Color "black";
Tex t2_ = "x" Offset [580,415] Color "black";