You can do this in a few ways and I will show you two of them.
First you find value of `f(x_0)`:
Next you find derivative of your function:
Now you find value of derivative at `x_0`:
Now we will use the formula for tangent at point `(x_0,y_0=f(x_0))`:
In this case we will use Mclaurin series. This is a more general method because in this way we can calculate polynomial of `n`-th degree that approximates our function at point `x_0=0.`
Since we are looking for linear approximation we will only use first two elements of above sum.
As you can see our result is the same in both cases because in both cases we used tangent to approximate our function. But we didn't have to use tangent. Sometimes it's better to use secant line to approximate function on a given interval.