How to find the equation of the line tangent to a curve in a given point

60 Views Asked by At

Let $f$ be:

$$f(x) = 100 - x^2 $$

As far as I understand, the slope of the line tangent to such curve is given by its derivative:

$$ f'(x) = -2x $$

I want the equation of the line tangent to $f$ at the point it crosses the x-axis, so $10$ if I'm not mistaken.

How can I infer this equation?

Note: I'm working with this function in Sage: sage online

EDIT

With the comments and this:

https://mathsathome.com/equation-of-a-tangent/

I managed to get what I wanted.

Here is the Sage code I used:

f(x) = 100 - x**2
fd(x) = -2*x

# The following comes from solving y = mx + c for c, 
# knowing that my point of interest is x = 10 
# (because that's were f cuts the x-axis), 
# so y = f(10) = 0, so m = fd(10). 
fr(x) = fd(10)*x + 200

p1 = plot(f, (0, 10))
p2 = plot(fr, (0, 10), color='green')

p1 + p2

Here the plot:

enter image description here

And here a link to the test:

https://sagecell.sagemath.org/?z=eJw9zDsKgDAQhOE-kDtMZzYP2GzvadTYBBOCRY7vgmL5fzBT3CSsyMxImN6LNWV_LYmfWuMt1czkJwKE2Rprelbutd2uRDiOekKkLD-P3yO2VttYl3Mcx7XQtw_o8gBu7x3Y&lang=sage&interacts=eJyLjgUAARUAuQ==

1

There are 1 best solutions below

0
On BEST ANSWER

This is the general formula of a tangent line on the function $f$ in the point $(x_0, y_0)$:

$$y=(x-x_0) \cdot f'(x_0) + y_0$$

Obviously: $y_0 = f(x_0)$

In your case:

$$y = (x - 10) \cdot (-2 \cdot 10) + 0 = -20x + 200$$