In trying to follow the calculation of the normal curvature of a curve $C$ at a point $P,$ using Geogebra and a somewhat random example, I got stuck. Here is what I did:
The surface $S$ was set up as with domain boundaries for $-1<x<1$ and $-1<y<1$ as:
$$f(x,y)=-x^2+\cos(x)+\cos(y)$$
The space curve $C\in \mathbb R^3$ was parametrized by $t$ with $-1<t<1$ as:
$$C(t)=(t,t^2,f(x,y))$$
With $x=t$ and $y=t^2.$
The normal vector to the surface $\vec N$ was calculated as:
$$\vec N(t)=\left (-\frac{\partial f}{\partial x}\frac{\partial x}{\partial t} ,-\frac{\partial f}{\partial y}\frac{\partial y}{\partial t},1\right)=\left(2t+\sin(t),\sin(t^2),1\right)$$
The tangent vector at point $P$ ($\vec T\in T_PS)$ was calculated as
$$\vec T(t) =\frac{d}{d t}C(t) =\left(1,2t,-2t-\sin(t)-2t\sin(t^2)\right)$$
This seemed to result in a plausible plot:
However, the calculation of the normal vector to $C$ at $P$ was not so happy:
$$\vec n=\frac{\vec T'}{\vert T\vert}=\frac{(0,2,-2\sin(t^2)-4t^2\cos(t^2)-2-\cos(t))}{\vert T\vert}$$
which would yield something like this (black arrow):
clearly not orthogonal to $\vec T.$
Where did I go wrong in this calculation of the normal vector of $C$ at $P$?
I would like to calculate this normal vector to the curve by differentiation; however, the only way I have been able to produce some plausible plot is by first calculating the binormal vector:
$$\vec B=\frac{T\wedge T'}{|T\wedge T'|}$$
to later do the cross product of $\vec T$ with $\vec B:$