1 | initial version |
Following @slelievre 's comment, here is a possible answer using maps $\mathbb{R} \to \mathbb{R}^2$ and $\mathbb{R}\to\mathbb{R}$:
We define first $f$ as a differentiable map $\mathbb{R} \to \mathbb{R}^2$ :
sage: R.<x> = RealLine()
sage: R2.<X,Y> = EuclideanSpace(name='R^2')
sage: f = R.diff_map(R2, (sin(x), cos(x)))
sage: f.display()
R --> R^2
x |--> (X, Y) = (sin(x), cos(x))
sage: f.coord_functions()
Coordinate functions (sin(x), cos(x)) on the Chart (R, (x,))
sage: f.coord_functions()(x)
(sin(x), cos(x))
sage: f.coord_functions()(pi)
(0, -1)
Then we define $H$ as the differentiable map $\mathbb{R}\to\mathbb{R}$ whose coordinate expression is $h(x)$:
sage: H = R.diff_map(R, function('h')(x))
sage: H.display()
R --> R
x |--> h(x)
and we compose $f$ by $H$ by means of the operator *
:
sage: g = f * H
sage: g
Curve in the Euclidean plane R^2
sage: g.display()
R --> R^2
x |--> (X, Y) = (sin(h(x)), cos(h(x)))
Then
sage: g(x)
Point on the Euclidean plane R^2
sage: g(x).coord()
(sin(h(x)), cos(h(x)))
sage: g(pi).coord()
(sin(h(pi)), cos(h(pi)))
sage: g.coord_functions()
Coordinate functions (sin(h(x)), cos(h(x))) on the Chart (R, (x,))
sage: g.coord_functions()(pi)
(sin(h(pi)), cos(h(pi)))
2 | No.2 Revision |
Following @slelievre 's comment, here is a possible answer using maps $\mathbb{R} \to \mathbb{R}^2$ and $\mathbb{R}\to\mathbb{R}$:
We define first $f$ as a differentiable map $\mathbb{R} \to \mathbb{R}^2$ :
sage: R.<x> = RealLine()
sage: R2.<X,Y> = EuclideanSpace(name='R^2')
sage: f = R.diff_map(R2, (sin(x), cos(x)))
sage: f.display()
R --> R^2
x |--> (X, Y) = (sin(x), cos(x))
sage: f(x)
Point on the Euclidean plane R^2
sage: f(x).coord()
(sin(x), cos(x))
sage: f(pi).coord()
(0, -1)
One can also access to the coordinate functions representing $f$:
sage: fc = f.coord_functions()
sage: fc
Coordinate functions (sin(x), cos(x)) on the Chart (R, (x,))
sage: f.coord_functions()(x) fc(x)
(sin(x), cos(x))
sage: f.coord_functions()(pi) fc(pi)
(0, -1)
Then we define $H$ as the differentiable map $\mathbb{R}\to\mathbb{R}$ whose coordinate expression is $h(x)$:
sage: H = R.diff_map(R, function('h')(x))
sage: H.display()
R --> R
x |--> h(x)
and we compose $f$ by $H$ by means of the operator *
:
sage: g = f * H
sage: g
Curve in the Euclidean plane R^2
sage: g.display()
R --> R^2
x |--> (X, Y) = (sin(h(x)), cos(h(x)))
Then
sage: g(x)
Point on the Euclidean plane R^2
sage: g(x).coord()
(sin(h(x)), cos(h(x)))
sage: g(pi).coord()
(sin(h(pi)), cos(h(pi)))
sage: g.coord_functions()
Coordinate functions (sin(h(x)), cos(h(x))) on the Chart (R, (x,))
sage: g.coord_functions()(pi)
(sin(h(pi)), cos(h(pi)))
3 | No.3 Revision |
Following @slelievre 's comment, here is a possible answer using maps $\mathbb{R} \to \mathbb{R}^2$ and $\mathbb{R}\to\mathbb{R}$:
We define first $f$ as a differentiable map $\mathbb{R} \to \mathbb{R}^2$ :
sage: R.<x> = RealLine()
sage: R2.<X,Y> = EuclideanSpace(name='R^2')
sage: f = R.diff_map(R2, (sin(x), cos(x)))
sage: f.display()
R --> R^2
x |--> (X, Y) = (sin(x), cos(x))
sage: f(x)
Point on the Euclidean plane R^2
sage: f(x).coord()
(sin(x), cos(x))
sage: f(pi).coord()
(0, -1)
One can also access to the coordinate functions representing $f$:
sage: fc = f.coord_functions()
sage: fc
Coordinate functions (sin(x), cos(x)) on the Chart (R, (x,))
sage: fc(x)
(sin(x), cos(x))
sage: fc(pi)
(0, -1)
Then we define $H$ as the differentiable map $\mathbb{R}\to\mathbb{R}$ whose coordinate expression is $h(x)$:
sage: H = R.diff_map(R, function('h')(x))
sage: H.display()
R --> R
x |--> h(x)
and we compose $f$ by $H$ by means of the operator *
:
sage: g = f * H
sage: g
Curve in the Euclidean plane R^2
sage: g.display()
R --> R^2
x |--> (X, Y) = (sin(h(x)), cos(h(x)))
Then
sage: g(x)
Point on the Euclidean plane R^2
sage: g(x).coord()
(sin(h(x)), cos(h(x)))
sage: g(pi).coord()
(sin(h(pi)), cos(h(pi)))
sage: g.coord_functions() gc = g.coord_functions(); gc
Coordinate functions (sin(h(x)), cos(h(x))) on the Chart (R, (x,))
sage: g.coord_functions()(pi) gc(pi)
(sin(h(pi)), cos(h(pi)))