I got the following feedback on my answer to this problem, and I haven't been able to figure out why: "The derivative evaluated at zero should return back a number, not a function."
Find the tangent line at x = 0 of
y= sin(2x) + 1
sin (0) + 1 = 1, y = 1
y' = cos(2x) * 2
y' = 2cos(2x) = m
y - 1 = 2cos(2x)(x-0)
y = 2xcos(2x) + 1
Let's start by understanding why the answer you gave can't be right. What does the graph of "$y=2x\cos(2x)+1$" look like?
Well, one option is to graph it - this will give you something that really doesn't look like a line! But what if we don't have access to a computer, or a graphing calculator?
Well, we can still tell this isn't a line by plugging in a few points:
When $x=0$, we have $y=1$.
When $x={\pi\over 4}$, we have $y=1$.
And when $x=\pi$, we have $y=2\pi+1$.
Draw the points $(0, 1)$, $({\pi\over 4},1)$, and $(\pi, 2\pi+1)$ on a graph; clearly these three points don't lie on a line. So $y=2x\cos(2x)$ can't possibly be the graph of the tangent line.
Alright, now that we know that the answer is wrong, let's try to understand why. In particular, we know that a line is the graph of a function of the form $$y=mx+b$$ for $m$ a constant (not something like "$2\cos(2x)$" in other words), so we're really trying to understand: what constant goes there?
Think back to what the tangent line means. The tangent line to a curve at some point $p$ is the line through $p$ that goes "in the same direction" as the curve, at that point (a phrase you'll hear down the road, if you haven't already, is: the tangent line is the best linear approximation to the curve, at that point). Specifically, we want the tangent line and the curve to "change in the same way" at that point - the rate of change of the tangent line (increasing or decreasing? steep or shallow?) should be the same as the curve.
You probably know where this is going:
But let's be a bit more specific. The right thing to say is:
Remember that the tangent line through one point will probably have a very different slope from the tangent line through a different point! E.g. take $f(x)=x^2$, and look at a point with negative $x$-coordinate versus a point with positive $x$-coordinate; it should be clear if you draw the graph that the tangent line through the former point will be decreasing, while the latter will be increasing. The slope of the tangent line changes with the point: each point yields its own slope. The derivative $f'(x)$ tells us how to find the slope of the tangent line through a given point, but the way we find that slope is to plug the relevant $x$-coordinate into $f'$!
In your example, the derivative is $f'(x)=2\cos(2x)$, and your point is $x=0, y=1$ - so the slope of the tangent line is $f'(0)=2\cos(0)=2$ (note that only the $x$-coordinate $x=0$ is relevant here), and the whole equation of the line is $y=2x+1$ (here the $y$-coordinate $y=1$ comes into play).
Hopefully this helps explain what's going on!