~ubuntu-branches/debian/squeeze/maxima/squeeze

« back to all changes in this revision

Viewing changes to tests/rtest7.mac

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2006-10-18 14:52:42 UTC
  • mto: (1.1.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20061018145242-vzyrm5hmxr8kiosf
ImportĀ upstreamĀ versionĀ 5.10.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
***************************************************************************/
7
7
 
8
8
 
9
 
kill(allbut(props));
10
 
DONE$
11
 
LINECHAR:%t;
 
9
kill(all);
 
10
done$
 
11
linechar:%t;
12
12
%t$
13
 
ATVALUE(F(X,Y),[X = 0,Y = 1],A^2);
14
 
A^2$
15
 
ATVALUE('DIFF(F(X,Y),X),X = 0,Y+1);
16
 
"@2"+1$
17
 
PRINTPROPS(ALL,ATVALUE);
18
 
DONE$
19
 
DIFF(4*F(X,Y)^2-U(X,Y)^2,X);
20
 
8*F(X,Y)*'DIFF(F(X,Y),X,1)-2*U(X,Y)*'DIFF(U(X,Y),X,1)$
21
 
AT(%,[X = 0,Y = 1]);
22
 
16*A^2-2*U(0,1)*(AT('DIFF(U(X,Y),X,1),[X = 0,Y = 1]))$
23
 
ATVALUE(F(X,Y),[X = 0,Y = 1],A^2);
24
 
A^2$
25
 
ATVALUE('DIFF(F(X,Y),X),X = 0,Y+1);
26
 
"@2"+1$
27
 
PRINTPROPS(ALL,ATVALUE);
28
 
DONE$
29
 
DIFF(4*F(X,Y)^2-U(X,Y)^2,X);
30
 
8*F(X,Y)*'DIFF(F(X,Y),X,1)-2*U(X,Y)*'DIFF(U(X,Y),X,1)$
31
 
AT(%,[X = 0,Y = 1]);
32
 
16*A^2-2*U(0,1)*(AT('DIFF(U(X,Y),X,1),[X = 0,Y = 1]))$
33
 
LISTOFVARS(F(X[1]+Y)/G^(2+A));
34
 
[G,A,X[1],Y]$
35
 
COEFF(2*A*TAN(X)+TAN(X)+B = 5*TAN(X)+3,TAN(X));
36
 
2*A+1 = 5$
37
 
COEFF(Y+X*%E^X+1,X,0);
38
 
Y+1$
39
 
A*X+B*X+5;
40
 
B*X+A*X+5$
41
 
RATCOEF(%,A+B);
42
 
X$
43
 
ISLINEAR(EXP,VAR):=BLOCK([C],C:BOTHCOEF(RAT(EXP,VAR),VAR),
44
 
         IS(FREEOF(VAR,C) AND C[1] # 0));
45
 
ISLINEAR(EXP,VAR):=BLOCK([C],C:BOTHCOEF(RAT(EXP,VAR),VAR),
46
 
         IS(FREEOF(VAR,C) AND C[1] # 0))$
47
 
ISLINEAR((R^2-(X-R)^2)/X,X);
48
 
TRUE$
49
 
(A+B)^4*(1+X*(2*X+(C+D)^2));
50
 
(B+A)^4*(X*(2*X+(D+C)^2)+1)$
51
 
(linenum:0,ISOLATE(%,X));
52
 
%t2*(X*(2*X+%t1)+1)$
53
 
RATEXPAND(%);
54
 
2*%t2*X^2+%t1*%t2*X+%t2$
55
 
EV(%);
56
 
2*(B+A)^4*X^2+(B+A)^4*(D+C)^2*X+(B+A)^4$
57
 
(A+B)*(X+A+B)^2*%E^(X^2+A*X+B);
58
 
(B+A)*(X+B+A)^2*%E^(X^2+A*X+B)$
59
 
block([linenum:2],EV(ISOLATE(%,X),EXPTISOLATE:TRUE));
60
 
%t3*%t4*(X+%t3)^2*%E^(X^2+A*X)$
61
 
exp1:INTEGRATE(1/(X^3+2),X);
62
 
  -LOG(X^2-2^(1/3)*X+2^(2/3))/(6*2^(2/3))+ATAN((2*X-2^(1/3))/(2^(1/3)*SQRT(3)))
63
 
                                        /(2^(2/3)*SQRT(3))
64
 
                                       +LOG(X+2^(1/3))/(3*2^(2/3))$
65
 
/* Got this at one point but it differentiates ok
66
 
  -2^(1/3)*LOG(2^(2/3)*X^2-2*X+2*2^(1/3))/12+2^(1/3)*ATAN((2*2^(2/3)*X-2)/(2*SQRT(3)))/(2*SQRT(3))+2^(1/3)*LOG(X+2^(1/3))/6; */
67
 
radcan(diff(%,X));
68
 
1/(X^3+2);
69
 
block([linenum:4],PICKAPART(exp1,1));
 
13
atvalue(f(x,y),[x = 0,y = 1],a^2);
 
14
a^2$
 
15
atvalue('diff(f(x,y),x),x = 0,y+1);
 
16
"@2"+1$
 
17
printprops(all,atvalue);
 
18
done$
 
19
diff(4*f(x,y)^2-u(x,y)^2,x);
 
20
8*f(x,y)*'diff(f(x,y),x,1)-2*u(x,y)*'diff(u(x,y),x,1)$
 
21
at(%,[x = 0,y = 1]);
 
22
16*a^2-2*u(0,1)*(at('diff(u(x,y),x,1),[x = 0,y = 1]))$
 
23
atvalue(f(x,y),[x = 0,y = 1],a^2);
 
24
a^2$
 
25
atvalue('diff(f(x,y),x),x = 0,y+1);
 
26
"@2"+1$
 
27
printprops(all,atvalue);
 
28
done$
 
29
diff(4*f(x,y)^2-u(x,y)^2,x);
 
30
8*f(x,y)*'diff(f(x,y),x,1)-2*u(x,y)*'diff(u(x,y),x,1)$
 
31
at(%,[x = 0,y = 1]);
 
32
16*a^2-2*u(0,1)*(at('diff(u(x,y),x,1),[x = 0,y = 1]))$
 
33
listofvars(f(x[1]+y)/g^(2+a));
 
34
[g,a,x[1],y]$
 
35
coeff(2*a*tan(x)+tan(x)+b = 5*tan(x)+3,tan(x));
 
36
2*a+1 = 5$
 
37
coeff(y+x*%e^x+1,x,0);
 
38
y+1$
 
39
a*x+b*x+5;
 
40
b*x+a*x+5$
 
41
ratcoef(%,a+b);
 
42
x$
 
43
islinear(exp,var):=block([c],c:bothcoef(rat(exp,var),var),
 
44
         is(freeof(var,c) and c[1] # 0));
 
45
islinear(exp,var):=block([c],c:bothcoef(rat(exp,var),var),
 
46
         is(freeof(var,c) and c[1] # 0))$
 
47
islinear((r^2-(x-r)^2)/x,x);
 
48
true$
 
49
(a+b)^4*(1+x*(2*x+(c+d)^2));
 
50
(b+a)^4*(x*(2*x+(d+c)^2)+1)$
 
51
(linenum:0,isolate(%,x));
 
52
%t2*(x*(2*x+%t1)+1)$
 
53
ratexpand(%);
 
54
2*%t2*x^2+%t1*%t2*x+%t2$
 
55
ev(%);
 
56
2*(b+a)^4*x^2+(b+a)^4*(d+c)^2*x+(b+a)^4$
 
57
(a+b)*(x+a+b)^2*%e^(x^2+a*x+b);
 
58
(b+a)*(x+b+a)^2*%e^(x^2+a*x+b)$
 
59
block([linenum:2],ev(isolate(%,x),exptisolate:true));
 
60
%t3*%t4*(x+%t3)^2*%e^(x^2+a*x)$
 
61
exp1:integrate(1/(x^3+2),x);
 
62
  -log(x^2-2^(1/3)*x+2^(2/3))/(6*2^(2/3))+atan((2*x-2^(1/3))/(2^(1/3)*sqrt(3)))
 
63
                                        /(2^(2/3)*sqrt(3))
 
64
                                       +log(x+2^(1/3))/(3*2^(2/3))$
 
65
/* got this at one point but it differentiates ok
 
66
  -2^(1/3)*log(2^(2/3)*x^2-2*x+2*2^(1/3))/12+2^(1/3)*atan((2*2^(2/3)*x-2)/(2*sqrt(3)))/(2*sqrt(3))+2^(1/3)*log(x+2^(1/3))/6; */
 
67
radcan(diff(%,x));
 
68
1/(x^3+2);
 
69
block([linenum:4],pickapart(exp1,1));
70
70
%t7+%t6+%t5$
71
 
GAMMA(7/2);
72
 
15*SQRT(%PI)/8$
73
 
NUMFACTOR(%);
 
71
gamma(7/2);
 
72
15*sqrt(%pi)/8$
 
73
numfactor(%);
74
74
15/8$
75
 
'DIFF(Y,X,2)+'DIFF(Y,Z,3)*2+'DIFF(Y,X,1)*X^2;
76
 
2*'DIFF(Y,Z,3)+'DIFF(Y,X,2)+X^2*'DIFF(Y,X,1)$
77
 
DERIVDEGREE(%,Y,X);
 
75
'diff(y,x,2)+'diff(y,z,3)*2+'diff(y,x,1)*x^2;
 
76
2*'diff(y,z,3)+'diff(y,x,2)+x^2*'diff(y,x,1)$
 
77
derivdegree(%,y,x);
78
78
2$
79
 
(%I*V+U)/(F+%I*E)+%E^(%I*ALPHA);
80
 
(%I*V+U)/(F+%I*E)+%E^(%I*ALPHA)$
81
 
REALPART(%);
82
 
(E*V+F*U)/(F^2+E^2)+COS(ALPHA)$
83
 
RECTFORM(SIN(2*%I+X));
84
 
COSH(2)*SIN(X)+%I*SINH(2)*COS(X)$
85
 
POLARFORM(%);
86
 
SQRT(COSH(2)^2*SIN(X)^2+SINH(2)^2*COS(X)^2)
87
 
 *%E^(%I*ATAN2(SINH(2)*COS(X),COSH(2)*SIN(X)))$
88
 
RECTFORM(LOG(3+4*%I));
89
 
LOG(5)+%I*ATAN(4/3)$
90
 
POLARFORM(%);
91
 
SQRT(LOG(5)^2+ATAN(4/3)^2)*%E^(%I*ATAN(ATAN(4/3)/LOG(5)))$
92
 
EV(RECTFORM((2+3.5*%I)^0.25),NUMER);
93
 
0.3682587918166914*%I+1.368266274774369;
94
 
/* tops 20 : 0.368258808*%I+1.36826627 */
95
 
POLARFORM(%);
96
 
1.416956998795383*%\E^(0.2629125531370934*%\I);
97
 
/* tops 20 :  1.416957*%E^(0.262912527*%I)$ */
98
 
DELETE(SIN(X),X+SIN(X)+Y);
99
 
Y+X$
 
79
(%i*v+u)/(f+%i*e)+%e^(%i*alpha);
 
80
(%i*v+u)/(f+%i*e)+%e^(%i*alpha)$
 
81
realpart(%);
 
82
(e*v+f*u)/(f^2+e^2)+cos(alpha)$
 
83
rectform(sin(2*%i+x));
 
84
cosh(2)*sin(x)+%i*sinh(2)*cos(x)$
 
85
polarform(%);
 
86
sqrt(cosh(2)^2*sin(x)^2+sinh(2)^2*cos(x)^2)
 
87
 *%e^(%i*atan2(sinh(2)*cos(x),cosh(2)*sin(x)))$
 
88
rectform(log(3+4*%i));
 
89
log(5)+%i*atan(4/3)$
 
90
polarform(%);
 
91
sqrt(log(5)^2+atan(4/3)^2)*%e^(%i*atan(atan(4/3)/log(5)))$
 
92
ev(rectform((2+3.5*%i)^0.25),numer);
 
93
0.3682587918166914*%i+1.368266274774369;
 
94
/* tops 20 : 0.368258808*%i+1.36826627 */
 
95
polarform(%);
 
96
1.416956998795383*%\e^(0.2629125531370934*%\i);
 
97
/* tops 20 :  1.416957*%e^(0.262912527*%i)$ */
 
98
delete(sin(x),x+sin(x)+y);
 
99
y+x$