TANGENT AND NORMAL LINE TO A CURVE DEFINED BY F(X) -  v1.2

This CAS-program finds the normal ( or perpendicular ) line N(x) through a given point (xN|yN) to the curve of a given function f(x) and computes
additionaly the tangent in the common intersection point (xT|yT) of curve and N(x).   

Example:
Given the function f(x) = 5/54*x^3 - 5/9*x^2 + 11/18*x + 34/27 and the point (xN|yN) = (3|3).

Select Vars, touch the CAS-field, then choose tangnorm and complete to:
tangnorm("f(x)",xN,yN).   ---------->    !!! BE SURE, to enter the expression for f(x) in STRINGS !!!
Your input must look like:
tangnorm("5*x^3/54-5*x^2/9+11*x/18+34/27",3,3).
Press ENTER to get the result: 
f(x)=5*x^3/54-5*x^2/9+11*x/18+34/27
x,N = 3      |  y,N = 3
-----POINT 1------
x,T = 5.0   |  y,T = 2.0  ------------>  intersection point between f(x) and N(x)
|d,N-T| = 2.236             ------------>  distance between (xN|yN) and (xT|yT)
N(x) = -0.5*x+4.5       
T(x) = 2.0*x-8.0
Press "Enter" to find a second point on f(x) for a normal line through (xN|yN):
-----POINT 2------
x,T = 2.0   |  y,T = 1.0  ------------>  intersection point between f(x) and N(x)
|d,N-T| = 2.236             ------------>  distance between (xN|yN) and (xT|yT)
N(x) = 2.0*x-3.0       
T(x) = -0.5*x+2.0
Press "Enter" and voila, a third point on f(x) for a normal line through (xN|yN) can be found:
-----POINT 3------
x,T = 3.67839   |  y,T = 0.5986  ---------->  intersection point between f(x) and N(x)
|d,N-T| = 2.4954             ------------>  distance between (xN|yN) and (xT|yT)
N(x) = -3.5399*x+13.6197       
T(x) = 0.28249*x-0.44054
Press "Enter" to conclude the calculation.

The number of points to be found is dependent on the degree of f(x) and 
the location of (xN|yN)! So, for example, if you change (xN|yN) to (-3|3), you will get only one point
for N(x)!

Claus Martin Dachselt
