1/*************** -*- Mode: MACSYMA; Package: MAXIMA -*-  ******************/
2/***************************************************************************
3***                                                                    *****
4***     Copyright (c) 1984 by William Schelter,University of Texas     *****
5***     All rights reserved                                            *****
6***************************************************************************/
7
8
91/(x^2+2);
101/(x^2+2)$
11substpart(3/2,%,2,1,2);
121/(x^(3/2)+2)$
1327*y^3+54*x*y^2+36*x^2*y+y+8*x^3+x+1;
1427*y^3+54*x*y^2+36*x^2*y+y+8*x^3+x+1$
15substpart(factor(piece),%,[1,2,3,5]);
16(3*y+2*x)^3+y+x+1$
171/x+y/x-1/z;
18-1/z+y/x+1/x$
19substpart(xthru(piece),%,[2,3]);
20(y+1)/x-1/z$
21substpart("+",%,1,0);
22-1/z+y+x+1$
23ratsimp((k^2*x^2-1)*(cos(x)+eps)/(3*k+n[1])/(5*k-n[2]));
24((k^2*x^2-1)*cos(x)+eps*k^2*x^2-eps)/(15*k^2+(5*n[1]-3*n[2])*k-n[1]*n[2])$
25factor(%);
26(k*x-1)*(k*x+1)*(cos(x)+eps)/((3*k+n[1])*(5*k-n[2]))$
27substpart(ratsimp(piece),%,1,[1,2]);
28(k^2*x^2-1)*(cos(x)+eps)/((3*k+n[1])*(5*k-n[2]))$
29-substpart(-piece,%,1,1);
30-((1-k^2*x^2)*(cos(x)+eps)/((3*k+n[1])*(5*k-n[2])))$
31a+b/(x*(y+(a+b)*x)+1);
32b/(x*(y+(b+a)*x)+1)+a$
33substpart(multthru(piece),%,1,2,1);
34b/(x*y+(b+a)*x^2+1)+a$
35x . 'diff(f(x),x,2);
36x . 'diff(f(x),x,2)$
37substinpart(d^2,%,2);
38x . d^2$
39substinpart(f1,f[1](x+1),0);
40f1(x+1)$
41
42/* SF bug #2667: "tex1 of f(x)^n" */
43
44simp:false $
45false $
46
47tex1 (sqrt(x)^n);
48"\\sqrt{x}^{n}";
49
50simp:true $
51true $
52
53tex1(sin(x)^2);
54"\\sin ^2x";
55
56tex1(f(x)^2);
57"f\\left(x\\right)^2";
58
59tex1(sin(x)^n);
60"\\sin ^{n}x";
61
62tex1(f(x)^n);
63"f\\left(x\\right)^{n}";
64
65tex1(sin(x)^-1);
66"{{1}\\over{\\sin x}}";
67
68tex1(f(x)^-1);
69"{{1}\\over{f\\left(x\\right)}}";
70
71tex1(sin(x)^-2);
72"{{1}\\over{\\sin ^2x}}";
73
74tex1(f(x)^-2);
75"{{1}\\over{f\\left(x\\right)^2}}";
76
77