Tool to calculate the tangent to a curve, to a function, at a given point (infinity close to this point) and to find its tangent line equation as a function of the variable x.

Tangent to a Curve - dCode

Tag(s) : Geometry

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!

A suggestion ? a feedback ? a bug ? an idea ? *Write to dCode*!

In geometry, a tangent to a curve is a straight line that approaches / caresses / touches the curve at this point so as to form an angle equal to 0.

The equation of the tangent at $ x = a $ is calculated from the equation of the curve $ f(x) $, by applying a limit calculation and a derivative calculation.

Calculate the limit $$ \lim_{h \to 0} \frac{f(a+h)-f(a)}{h} $$

If the limit is indeterminate, then there is no tangent at this point (the function is not differentiable in $ x = a $)

If the limit is infinite ($ +\infty $ or $ -\infty $), then the line of equation $ x = a $ is a tangent in $ a $ (and also an asymptote)

Otherwise (the limit is finite, it has a value) then calculate $ f'(x) $ the derivative of $ f (x) $ in order to obtain the equation of the tangent in $ a $ which is defined by the formula $$ y = (x-a) \times f'(a) + f(a) $$

__Example:__ Determinate the tangent equation of $ f(x) = x^2 $ at the point $ x = 1 $, first calculate the limit $$ \lim_{h \to 0} \frac{(1+h)^2-1^2}{h} = \lim_{h \to 0} \frac{2h+h^2}{h} = \lim_{h \to 0} 2+h = 2 $$ this limit is therefore finite, the function is differentiable and its derivative is $ f'(x) = 2x $, so the tangent equation is $$ y = (x-a) \times f'(a) + f(a) \\ y = (x-1) \cdot 2 \cdot 1 + 1^2 \\ y = 2x-2+1 \\ y = 2x-1 $$

If it is already known that the function is differentiable in $ a $, then the calculation of the limit is not necessary and the formula can be applied directly.

dCode retains ownership of the "Tangent to a Curve" source code. Except explicit open source licence (indicated Creative Commons / free), the "Tangent to a Curve" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Tangent to a Curve" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Tangent to a Curve" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!

Reminder : dCode is free to use.

The copy-paste of the page "Tangent to a Curve" or any of its results, is allowed (even for commercial purposes) as long as you cite dCode!

Exporting results as a .csv or .txt file is free by clicking on the *export* icon

Cite as source (bibliography):

*Tangent to a Curve* on dCode.fr [online website], retrieved on 2023-12-03,

tangent,equation,line,curve,function

https://www.dcode.fr/tangent-equation

© 2023 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.

Feedback