aboutsummaryrefslogtreecommitdiffstats
path: root/buch/chapters/90-crypto/rechnungen/tangent.maxima
blob: aa7d236239aa244ee763538ca70c3d47b77ddf42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
 * tangent.maxima
 *
 * (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule 
 */

p: Y^2+X*Y - X^3 - a*X -b;

x: x1 + u * t;
y: y1 + v * t;

q: subst(x,X,p);
q: subst(y,Y,q);
q: ratsimp(expand(q));
tex(q);
tex(coeff(expand(q), t, 3));
tex(coeff(expand(q), t, 2));
tex(coeff(expand(q), t, 1));
tex(coeff(expand(q), t, 0));
qr: divide(q,t^2,t);
r: qr[2];
s: solve(qr[1] = 0, t);
tex(s);

T: subst(s, t);

U: x1+2*y1;
V: y1-3*x1^2-a;
X: subst(U, u, x);
Y: subst(V, v, y);
T: subst(U, u, T);
T: subst(V, v, T);
ratsimp(expand(T));

q: subst(U, u, q);
q: subst(V, v, q);

qr: divide(q,t^2,t);
r: qr[2];
q: qr[1];
tex(q);

tex(coeff(r, t, 3));
tex(coeff(r, t, 2));
tex(coeff(r, t, 1));
tex(coeff(r, t, 0));

subst(0,t,r);
subst(0,t,diff(r,t));

tex(r);

polydecomp(qr[2], t);

s: solve(q = 0, t);
tex(s);

/*
x3: ratsimp(expand(subst(s, -X)));
y3: ratsimp(expand(subst(s, -Y-X)));
*/

x3: ratsimp(expand(subst(s, X)));
y3: ratsimp(expand(subst(s, Y)));

tex(x3);
tex(y3);