Given a curve [ y = x(A – x) ], the task is to find tangent at given point (x, y) on that curve, where A, x, y are integers.
Input: A = 2, x = 2, y = 0 Output: y = -2x - 4 Since y = x(2 - x) y = 2x - x^2 differentiate it with respect to x dy/dx = 2 - 2x put x = 2, y = 0 in this equation dy/dx = 2 - 2* 2 = -2 equation => (Y - 0 ) = ((-2))*( Y - 2) => y = -2x -4 Input: A = 3, x = 4, y = 5 Output: Not possible Point is not on that curve
- First find if the given point is on that curve or not.
- If the point is on that curve then, Find the derivative
- Calculate the gradient of the tangent by Putting x, y in dy/dx.
- Determine the equation of the tangent by substituting the gradient of the tangent and the coordinates of the given point into the gradient-point form of the straight line equation, where Equation of normal is Y – y = ( dy/dx ) * (X – x).
- Find normal at a given point on the curve
- Radii of the three tangent circles of equal radius which are inscribed within a circle of given radius
- Angle between a chord and a tangent when angle in the alternate segment is given
- Find nth term of the Dragon Curve Sequence
- Length of the transverse common tangent between the two non intersecting circles
- Length of the direct common tangent between two externally touching circles
- Length of direct common tangent between the two non-intersecting Circles
- Length of direct common tangent between two intersecting Circles
- Radius of the inscribed circle within three tangent circles
- Cubic Bezier Curve Implementation in C
- Python - Hilbert Curve using turtle
- Rotation of a point about another point in C++
- Reflection of a point at 180 degree rotation of another point
- Find an Integer point on a line segment with given two ends
- Find the other end point of a line with given one end and mid
- Find middle point segment from given segment lengths
- Find a point that lies inside exactly K given squares
- Find the point on X-axis from given N points having least Sum of Distances from all other points
- Check if the given point lies inside given N points of a Convex Polygon
- Find if a point lies inside a Circle
Below is the implementation of the above approach:
y = -2x-4
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.