Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In[708]:= f1x0 = 3.4
- f1der[f1x0]
- f1x0s = MakeSlope[f1der[f1x0]];
- f1x0s[x]
- f1x0ydif = f1[f1x0] - f1x0s[f1x0]
- f1x0t = f1x0s[x] + f1x0ydif
- Out[708]= Function[x, 2 x]
- Out[710]= 3.4
- Out[711]= 6.8
- Out[713]= 6.8 x
- Out[714]= -11.56
- Out[715]= -11.56 + 6.8 x
- GetTangent[f_,x0_]:=Module[{fder,der,x,s,ydif,t},
- fder=Function[x,Evaluate[D[f[x],x]]];
- der=fder[x0];
- s=MakeSlope[der];
- ydif=f[x0]-s[x0];
- t=s[x]+ydif;
- t
- ];
- In[705]:= f1t = GetTangent[Function[x, x^2], 2]
- Out[706]= -4 + 4 x$98923
Add Comment
Please, Sign In to add comment