Here’s a pretty innocent  function:

f[x_]:=Log[x^2-3x+1]

We can get Mathematica to plot it pretty easily:

Plot[f[x],{x,-2,4}]

To get the tangent line at (3,0), we need the derivative, evaluated at x=3:

fp[x_]=D[f[x],x]
fp[3]

Now use point slope to write y-0=3(x-3), or y=3x-9:

Plot[{f[x],3x-9},{x,-2,4}]

Generally you’re interested in the tangent line in the vicinity of the point (3,0), so let’s zoom in:

Plot[{f[x],3x-9},{x,2.8,3.2}]

Beautiful osculation! :)