# Thread: Tangent of Curve Calculaton

1. ## Tangent of Curve Calculaton

Hi,

I have four X Points(x0,x1,x2,x3) and corresponding Y Points(y0,y1,y2,y3), A Curve can be connected using these points, I want to find tangent of this curve. How do I get this or what is method I suppose to use.

Pandi K

2. ## Re: Tangent of Curve Calculaton

What do you mean by find the tangent?

The gradient of the tangent can be found with $\frac{y2-y1}{x2-x1}$, where y2 is the biggest y-coordinate you have ( which is 3 in your case ) and y1 is the smallest y coordinate you have. Same thing applies for X2 and X1. So sub all values in, you should end up with $\frac{3-0}{3-0}$ and therefore the gradient of the tangent is 1.
THE "tangent to a curve" makes no sense. A curve may have a different tangent at any point. And, of course, because there are an infinite number of functions, even "differentiable" functions or even polynomials, that pass through four given points, there is no way of knowing which is meant or at which point you want the tangent. That's why Tutu gives you the slope of the secant line through the two endpoints. However, he makes the error of assuming that by " $x_0, x_1, x_2, x_3$" and " $y_0, y_1, y_2, y_3$" you mean that x=0 and y= 0; x= 1, y= 1; x= 2, y= 2; x=3, y= 3 so that your points all lie on the straight line y= x.
Given four distinct points, $(x_0, y_0)$, $(x_1, y_1)$, $(x_2, y_2)$, and $(x_3, y_3)$, the simplest thing to do, although not the only answer, is to find the unique cubic function that passes through those points: that is, find $y= ax^3+ bx^2+ cx+ d$ so that $y_0= ax_0^3+ bx_0^2+ cx_0+ d$, $y_1= ax_1^3+ bx_1^2+ cx_1+ d$, $y_2= ax_2^3+ bx_2^2+ cx_2+ d$, and $y_3= ax_3^3+ bx_3^2+ cx_3+ d$. Solve those four equations for a, b, c, and d. Then the slope of the tangent line at any point at x is given by $y'= 3ax^2+ 2bx+ c$. That allows you to find the tangent line at that particular point to that particular curve.