Find the tangent line on $f(x)=x^2$ which runs parallel to the slope of $y=2x+6$.
Solution 1: The equation of the tangent line is $y= 2x -1$
Explanation: Suppose $y= 2x + c .......(1)$
be the equation of the tangent we're looking for. Why the slope of the line is $2$? Think about it. Since this straight line is a tangent to the graph of $y= x^2$........(2), there is exactly one solution to the equation $(1)$ and $(2)$. If we substitute the $y$ value from (1) into the equation (2), then we have the following equation
$$ x^2 = 2x +c.$$ Equivalently, $$ x^2 -2x -c.$$ This quadratic equation must have discriminant equals to $0$. Think about it why? Therefore, we have $$(-2)^2 - 4.1. (-c)= 0.$$ Hence, $$ c= -1$$. This gives our required tangent line.
Solution 2: Easy one
Let $(p, p^2)$ be point on the graph where the tangent line touches the graph.
Note that the derivative of the function $x^2$ at the point $(p, p^2)$ is $2p$. You see why? This derivative is essentially the slope of the tangent line. Hence $$2p = 2.$$ Therefore, $p =1$. Then the point on the graph is basically $(1,1)$. Now use our favorite point-slope formula to find the equation of the tangent line. So, the equation of the tangent line is $$y-1 = 2(x-2),$$ and we're done.