Zurück zum Inhaltsverzeichnis

Kapitel 12

> restart:

Substitutionen

> subs(x=a,(x+y)*z);subs(x+y=a,(x+y)*z);subs(x=a+1,sqrt(x^2+1));

(a+y)*z

a*z

sqrt((a+1)^2+1)

> subs( x+y=3, x+y+z);

x+y+z

> op(x+y+z);

x, y, z

> op((x+y)*z);

x+y, z

>

> subs( x=2, y=3, x^2 + 2*x*y + y^2 );

25

> subs( x=y^2, y=x^2, sin(x)+cos(y) );

sin(x^4)+cos(x^2)

> subs( y=x^2, x=y^2, sin(x)+cos(y) );

sin(y^2)+cos(y^4)

> subs( {x=y^2, y=x^2}, sin(x)+cos(y) );

sin(y^2)+cos(x^2)

> solve( {x^2+y^2=10, x+y=4});

{y = 1, x = 3}, {x = 1, y = 3}

> subs("[1], x^2 + 2*x*y + y^2);

16

> subs( x+y=3, sin(x+y));

sin(3)

algsub ist leistungsfähiger

> algsubs( x+y=3, x+y+z);

3+z

> algsubs( x+y=3, 2*x+y+z);

-y+6+z

> algsubs( x+y=3, 2*x+y+z, [y]);

x+3+z

> algsubs( x+y=3, 2*x+y+z, exact);

2*x+y+z

> algsubs( x^2=a, x^5);

a^2*x

> algsubs(s/t=v, s/t^2);

v/t

ein komplizierteres Beispiel

> f:=x/sqrt(10+2*sqrt(5))+y/sqrt(10-2*sqrt(5));

f := x/(sqrt(10+2*sqrt(5)))+y/(sqrt(10-2*sqrt(5)))

> a:=sqrt(10+2*sqrt(5));
b:=sqrt(10-2*sqrt(5));

a := sqrt(10+2*sqrt(5))

b := sqrt(10-2*sqrt(5))

Das funktioniert nicht wegen des negativen Exponenten der Wurzel

> subs(a=A, b=B, f);

x/(sqrt(10+2*sqrt(5)))+y/(sqrt(10-2*sqrt(5)))

etwas kompliziert, aber so gehts

> f2:=subs(1/a=1/A, 1/b=1/B, f);

f2 := x/A+y/B

Noch so ein Beispiel

> restart;

> f:=x/sqrt(a+b*sqrt(c));

f := x/(sqrt(a+b*sqrt(c)))

> algsubs(sqrt(a+b*sqrt(c))=A, f);

Error, (in algsubs) no variables appearing rationally in pattern

> algsubs(a+b*sqrt(c)=a, f);

x/(sqrt(a))

> subs(1/sqrt(a+b*sqrt(c))=1/A,f);

x/A

>

expand

> restart:

> x*(x-a)^2*(x-b)^3;

x*(x-a)^2*(x-b)^3

> expand(%);

x^6-3*x^5*b+3*x^4*b^2-x^3*b^3-2*x^5*a+6*x^4*a*b-6*x...
x^6-3*x^5*b+3*x^4*b^2-x^3*b^3-2*x^5*a+6*x^4*a*b-6*x...

> a^(b+c^(d+e*f)): % = expand(%);

a^(b+c^(d+e*f)) = a^b*a^(c^d*c^(e*f))

> expand( log(a*b) ), expand( log(a^b));

ln(a*b), ln(a^b)

> expand(sin(4*x));

8*sin(x)*cos(x)^3-4*sin(x)*cos(x)

> expand(sin(a+b));

sin(a)*cos(b)+cos(a)*sin(b)

> f:=(x-a)^2/(x+b)^3: expand(f);

x^2/((x+b)^3)-2*x*a/((x+b)^3)+a^2/((x+b)^3)

> expand(numer(f)) / expand(denom(f));

(x^2-2*x*a+a^2)/(x^3+3*x^2*b+3*x*b^2+b^3)

> normal(f,expanded);

(x^2-2*x*a+a^2)/(x^3+3*x^2*b+3*x*b^2+b^3)

factor

> factor(x^4+x^3*a-4*x^3*b-4*x^2*a*b+4*x^2*b^2+4*x*b^2*a);

x*(2*b-x)^2*(x+a)

> factor(x^4-y^4);

-(y-x)*(y+x)*(y^2+x^2)

> factor((x^2+x-6)/(x^2-1));

(x+3)*(x-2)/((x-1)*(x+1))

> factor(x^2-2);

x^2-2

> factor(x^2-2.);

(x+1.414213562)*(x-1.414213562)

> factor(x^2-2,sqrt(2));

(x+sqrt(2))*(x-sqrt(2))

> factor(x^2+3,{I,sqrt(3)});

(x+I*sqrt(3))*(x-I*sqrt(3))

> factor(x^2+3,RootOf(x^2+3));

(x+RootOf(_Z^2+3))*(x-RootOf(_Z^2+3))

> convert(%,radical);

(x+sqrt(-3))*(x-sqrt(-3))

>

Noch ein Beispiel

> restart;

> f:=4*x^5+20*x^3+4*x^2+20;

f := 4*x^5+20*x^3+4*x^2+20

> factor(f);

4*(x+1)*(x^2-x+1)*(x^2+5)

> factor(f,{RootOf(op(%)[3]),RootOf(op(%)[4])});

-4*(x-1+RootOf(_Z^2-_Z+1))*(x-RootOf(_Z^2-_Z+1))*(x...
-4*(x-1+RootOf(_Z^2-_Z+1))*(x-RootOf(_Z^2-_Z+1))*(x...

> convert(%,radical);

4*(x-1/2-1/2*I*sqrt(3))*(x-1/2+1/2*I*sqrt(3))*(x+sq...

> evalf(%);

4.*(x-.5000000000+.8660254040*I)*(x-.5000000000-.86...
4.*(x-.5000000000+.8660254040*I)*(x-.5000000000-.86...

> factor(f,complex);

4.*(x+1.)*(x+2.236067977*I)*(x-2.236067977*I)*(x-.5...
4.*(x+1.)*(x+2.236067977*I)*(x-2.236067977*I)*(x-.5...

combine

> combine(4*cos(x)^3,trig);

cos(3*x)+3*cos(x)

> combine(sin(x+y)*sin(x-y),trig);

1/2*cos(2*y)-1/2*cos(2*x)

> combine(cos(x)^2,trig);

1/2*cos(2*x)+1/2

> combine(sqrt(3)*sqrt(5));

sqrt(15)

> assume(a>0,b>0):combine(sqrt(a)*sqrt(b));

sqrt(a*b)

> unassign('a,b'):combine(x^a*x^b,power);

x^(a+b)

> combine( exp(sin(x)^2)*exp(cos(x)^2));

exp(1)

> restart:

> combine(-ln(a)+2*ln(b), ln);

-ln(a)+2*ln(b)

> combine(-ln(a)+2*ln(b), ln, symbolic);

ln(b^2/a)

> assume(a>0,b>0):

> combine(-ln(a)+2*ln(b),ln);

ln(b^2/a)

sometimes, combine is a little bit too restrictive (expected: ln(b^n/a) )

the option symbolic does not help

> assume(n,posint):
combine(-ln(a)+n*ln(b), ln);

-ln(a)+n*ln(b)

> combine(-ln(a)+ln(b)*n, ln,symbolic);

-ln(a)+ln(b)*n

expected c^b

> assume(b>0,c>0):

> combine(exp(b*ln(c)), ln);

exp(b*ln(c))

> combine(exp(b*ln(c)), ln, symbolic);

exp(b*ln(c))

> restart:

> combine(int(f(x),x=a..b)+ int(g(x), x=a..b));

int(f(x)+g(x),x = a .. b)

no simplification with different integration variables

> combine(int(f(x),x=a..b)+ int(g(y), y=a..b));

int(f(x),x = a .. b)+int(g(y),y = a .. b)

> expand( (sin(5*x)-cos(5*x))^3);

4096*sin(x)^3*cos(x)^12-125*cos(x)^3+1500*cos(x)^5+...
4096*sin(x)^3*cos(x)^12-125*cos(x)^3+1500*cos(x)^5+...
4096*sin(x)^3*cos(x)^12-125*cos(x)^3+1500*cos(x)^5+...
4096*sin(x)^3*cos(x)^12-125*cos(x)^3+1500*cos(x)^5+...
4096*sin(x)^3*cos(x)^12-125*cos(x)^3+1500*cos(x)^5+...
4096*sin(x)^3*cos(x)^12-125*cos(x)^3+1500*cos(x)^5+...

> combine(%,trig);

3/2*sin(5*x)-3/2*cos(5*x)+1/2*sin(15*x)+1/2*cos(15*...

> trm:=diff(x/(1-a^x), x$2);

trm := 2*a^x*ln(a)/((1-a^x)^2)+2*x*(a^x)^2*ln(a)^2/...

combine vereinfacht diesen Ausdruck nicht

> combine(trm);

2*a^x*ln(a)/((1-a^x)^2)+2*x*a^(2*x)*ln(a)^2/((1-a^x...

auch simplify hat keinen Erfolg

> simplify(trm);

-ln(a)*(2*a^x-2*a^(2*x)+x*a^(2*x)*ln(a)+x*a^x*ln(a)...

mit normal erreicht man die gewünschte Vereinfachung:

> normal(trm);

-a^x*ln(a)*(2-2*a^x+x*a^x*ln(a)+x*ln(a))/((-1+a^x)^...

radnormal

> f:=(sqrt(2)-sqrt(3)) / (sqrt(2)*sqrt(3));

f := 1/6*(sqrt(2)-sqrt(3))*sqrt(2)*sqrt(3)

> simplify(f);

1/6*(sqrt(2)-sqrt(3))*sqrt(2)*sqrt(3)

> combine(f);

(1/6*sqrt(2)-1/6*sqrt(3))*sqrt(6)

> radnormal( f );

1/3*3^(1/2)-1/2*2^(1/2)

>

1/3*sqrt(3)-1/2*sqrt(2)

simplify

für manche Terme liefert simplify sofort das Erwartete:

> diff( x/(1-x^2), x$3);

48*x^2/((1-x^2)^3)+6/((1-x^2)^2)+48*x^4/((1-x^2)^4)...

> simplify(%);

6*(6*x^2+x^4+1)/((-1+x^2)^4)

> simplify( sin(x)^2+cos(x)^2 );

1

> simplify( exp(a*ln(b)) );

b^a

> f:=sin(a^2-b^2)^2 + cos( (a-b)*(a+b) )^2;
simplify(f);

f := sin(-a^2+b^2)^2+cos((a-b)*(a+b))^2

1-cos(-a^2+b^2)^2+cos((-a+b)*(a+b))^2

> expand(f);

sin(a^2)^2*cos(b^2)^2+cos(a^2)^2*sin(b^2)^2+cos(a^2...

> simplify( %);

1

> simplify( sqrt(Pi^2 * n^2) );

Pi*csgn(n)*n

> simplify( sqrt(Pi^2 * n^2), symbolic);

Pi*n

> assume(n>=0): simplify(sqrt(Pi ^2 * n^2));

Pi*n

> simplify((a*b)^c), simplify((a*b)^c, symbolic);

(a*b)^c, a^c*b^c

> simplify(sqrt(1/x)), simplify(sqrt(1/x), symbolic);

(1/x)^(1/2), 1/x^(1/2)

für andere nicht

> f:=(x-2)*(x+2)*(x^2+4);

f := (x-2)*(x+2)*(x^2+4)

> simplify( f );

(x-2)*(x+2)*(x^2+4)

expand liefert hier eher das Erwartete. Aber: auch das Resultat von simplify ist einfach

in Bezug auf den Grad der beteiligten Faktoren.

> expand(%);

x^4-16

simplify( (x-1)^10+1 );

x^10-10*x^9+45*x^8-120*x^7+210*x^6-252*x^5+210*x^4-...

einige Ausdrücke sind wirklich schwierig

> restart:

> f:=diff( x/(1-sin(x)), x$3);

f := 6*cos(x)^2/((1-sin(x))^3)-3*sin(x)/((1-sin(x))...

> simplify(f);

-(3*cos(x)^2*sin(x)+6*sin(x)-x*cos(x)^3+4*x*cos(x)*...

>

> combine(f);

(-21330-144*x*cos(3*x)*cos(4*x)+38508*sin(x)+10060*...
(-21330-144*x*cos(3*x)*cos(4*x)+38508*sin(x)+10060*...
(-21330-144*x*cos(3*x)*cos(4*x)+38508*sin(x)+10060*...
(-21330-144*x*cos(3*x)*cos(4*x)+38508*sin(x)+10060*...
(-21330-144*x*cos(3*x)*cos(4*x)+38508*sin(x)+10060*...
(-21330-144*x*cos(3*x)*cos(4*x)+38508*sin(x)+10060*...
(-21330-144*x*cos(3*x)*cos(4*x)+38508*sin(x)+10060*...
(-21330-144*x*cos(3*x)*cos(4*x)+38508*sin(x)+10060*...
(-21330-144*x*cos(3*x)*cos(4*x)+38508*sin(x)+10060*...
(-21330-144*x*cos(3*x)*cos(4*x)+38508*sin(x)+10060*...

aber:

> normal(f);

(6*cos(x)^2-6*cos(x)^2*sin(x)-3*sin(x)+6*sin(x)^2-3...
(6*cos(x)^2-6*cos(x)^2*sin(x)-3*sin(x)+6*sin(x)^2-3...

> combine(numer(%))/denom(%);

(6-3/4*sin(3*x)-27/4*sin(x)+1/4*x*cos(3*x)+19/4*x*c...

das geht auf jeden Fall besser als von Hand

Andere Methode:

> subs(1-sin(x)=A,f);

6*cos(x)^2/(A^3)-3*sin(x)/(A^2)+6*x*cos(x)^3/(A^4)-...

> collect(%,A);

(-3*sin(x)-x*cos(x))/(A^2)+(6*cos(x)^2-6*x*cos(x)*s...

> subs(A=1-sin(x),%);

(-3*sin(x)-x*cos(x))/((1-sin(x))^2)+(6*cos(x)^2-6*x...

>

simplify einschränken

> f:=exp(b*ln(a)) - (a*sin(x)^2+a*cos(x)^2)^b;

f := exp(b*ln(a))-(a*sin(x)^2+a*cos(x)^2)^b

nur trigonometrische Vereinfachungen

> simplify(f,trig);

exp(b*ln(a))-a^b

nur Vereinfacungen von exp-Ausdrücken

> simplify(f,exp);

a^b-(a*sin(x)^2+a*cos(x)^2)^b

jetzt alles

> simplify(f);

0

simplify mit Nebenbedingungen

> gl1 := a+b+c = 3:
gl2 := a^2+b^2+c^2 = 9:
gl3 := a^3+b^3+c^3 = 24:
simplify(a^4+b^4+c^4, {gl1,gl2,gl3});

69

> simplify( (a-b+c)^2, {a+b=1});

c^2+2*c+1+(-4*c-4)*b+4*b^2

> simplify( (a-b+c)^2, {a+b=1}, {a});

4*b^2-4*b*c+c^2-4*b+2*c+1

> gl1:=x^2+3*x+4*x*y=7;
gl2:=y^2-6*x*y+x=0;

gl1 := x^2+3*x+4*x*y = 7

gl2 := y^2-6*x*y+x = 0

> lsg:=simplify(gl1, {gl2},{x});

lsg := y^2*(14*y+25*y^2-3)/(36*y^2-12*y+1) = 7

> simplify(gl2,{gl1},{y});

1/16*(94*x^3+25*x^4-173*x^2-42*x+49)/(x^2) = 0

> gl1 := a+b+c = 7:
gl2 := a-b+3*c = 8:
gl3 := a-2*b+5*c = 9:
simplify( {gl1,gl2}, {gl3},{a});

{3*b-4*c+9 = 7, b-2*c+9 = 8}

convert

> convert(sin(x),exp);

-1/2*I*(exp(I*x)-1/exp(I*x))

> convert(sin(2*x)^2, tan);

4*tan(x)^2/((1+tan(x)^2)^2)

> convert(exp(I*x),trig);

cos(x)+I*sin(x)

> convert(arctan(x),ln);

1/2*I*(ln(1-I*x)-ln(1+I*x))

> restart:

> f:=arctan(tan(t));

f := arctan(tan(t))

> simplify(%,symbolic);

t

> convert( (n+m)!, GAMMA);

GAMMA(n+m+1)

> convert( GAMMA(n+m)!, factorial);

((n+m)!/(n+m))!

Polynome, Rationale Funktionen

> sin(x)/x^2: numer(%), denom(%);

sin(x), x^2

> a*x/(1-x^2)+b/x;

a*x/(1-x^2)+b/x

> numer(%), denom(%);

-a*x^2-b+b*x^2, (-1+x^2)*x

> quo(x^2-3,x+1,x);

x-1

> p1:=a*x^2+b*x+c: p2:=d*x+e:

> quo(p1,p2,x);

a*x/d+(d*b-e*a)/(d^2)

> rem(p1,p2,x);

(d^2*c-e*d*b+e^2*a)/(d^2)

> simplify(%% * p2 + %);

a*x^2+b*x+c


> diff(x^n/(a+x),x);

x^n*n/(x*(a+x))-x^n/((a+x)^2)

> normal(%);

x^n*(n*a+n*x-x)/(x*(a+x)^2)

> normal(%,expanded);

(x^n*n*a+x^n*n*x-x^n*x)/(x*a^2+2*a*x^2+x^3)

> convert(x/(x^4-1),parfrac,x);

1/4*1/(x-1)+1/4/(x+1)-1/2*x/(x^2+1)

> convert(x*y/(x-y)^2, parfrac, x);

y^2/((x-y)^2)+y/(x-y)

> convert(x*y/(x-y)^2, parfrac, y);

x^2/((x-y)^2)-x/(x-y)

> f:=sin(x) / (sin(x)^2-1);

f := sin(x)/(sin(x)^2-1)

Release 3 was able to convert this expression to partial fraction form

> convert(f, parfrac, sin(x));

Error, (in parfrac/parfrac) cannot convert to partial fraction form

> convert(f, parfrac, sin);

Error, (in convert/parfrac) argument not a rational function

in Release 4, a substitution helps

> convert(subs(sin(x)=si,f), parfrac, si);subs(si=sin(x),%);

1/2*1/(si-1)+1/2/(si+1)

1/2*1/(sin(x)-1)+1/2/(sin(x)+1)

> f:=-(-exp(-s)/s + exp(-2*s)/s) / (s+1);

f := -(-exp(-s)/s+exp(-2*s)/s)/(s+1)

> convert(f,parfrac,s);

Error, (in convert/parfrac) argument not a rational function

> convert( subs(exp(-s)=e1, exp(-2*s)=e2, f), parfrac, s);

(e1-e2)/s-(e1-e2)/(s+1)

> subs(e1=exp(-s), e2=exp(-2*s), %);

(exp(-s)-exp(-2*s))/s-(exp(-s)-exp(-2*s))/(s+1)

> simplify(%-f);

0

fullparfrac

> convert((x^2+1)/(x^2+x+1), parfrac, x);

1-x/(x^2+x+1)

> convert(convert(%, fullparfrac, x),radical);

1+(-1/2-1/6*I*sqrt(3))/(x+1/2-1/2*I*sqrt(3))+(-1/2+...

confrac

> convert((x^4-2)/x^6, confrac, x);

1/(x^2+2/(x^2-2/(x^2)))

horner

> f:=expand( (x-y)^3*x^2*y^2 + y^3 + y^2 + y);

f := x^5*y^2-3*x^4*y^3+3*x^3*y^4-x^2*y^5+y^3+y^2+y

> convert(f,horner,x);

y^3+y^2+y+(-y^5+(3*y^4+(-3*y^3+x*y^2)*x)*x)*x^2

> convert(f,horner,[x,y]);

(1+(1+y)*y)*y+(-y^5+(3*y^4+(-3*y^3+x*y^2)*x)*x)*x^2...

compoly

> f:=expand(subs(a=x^2+x, (a^2-a+1)^2));

f := x^8+4*x^7-2*x^5-2*x^4+4*x^6+4*x^3+x^2-2*x+1

> compoly(f);

x^4+1-2*x+3*x^2-2*x^3, x = x^2+x

>

trigsubs

> trigsubs(sin(x)^2);

[sin(x)^2, 1-cos(x)^2, 1/2-1/2*cos(2*x), sin(x)^2, ...
[sin(x)^2, 1-cos(x)^2, 1/2-1/2*cos(2*x), sin(x)^2, ...

> trigsubs( sin(x)=sqrt(1-cos(x)^2), (sin(x)^2-cos(x)^2)^2 );

Error, (in trigsubs) not found in table - use subs to over ride

> trigsubs( sin(x)^2=1-cos(x)^2, (sin(x)^2-cos(x)^2)^2 );

(1-2*cos(x)^2)^2

> trigsubs( sin(x+y) = 2 * sin((x+y)/2) * cos((x+y)/2) );

`\`found\``

Ausdrücke mit mehreren Variablen
(sort, collect, select, remove etc.)

> f:=expand( (a*x^2*y+b*y)^2 + (x-2*y+c*y^2)^2 + x^3 + x^4*y^2);

f := a^2*x^4*y^2+2*a*x^2*y^2*b+b^2*y^2+x^2-4*x*y+2*...

sort

> sort(f);

a^2*x^4*y^2+2*a*b*x^2*y^2+c^2*y^4+x^4*y^2+b^2*y^2+2...

> sort(f,x);

a^2*y^2*x^4+y^2*x^4+x^3+2*a*b*y^2*x^2+x^2+2*c*y^2*x...

> sort(f,[x,y]);

a^2*x^4*y^2+x^4*y^2+2*a*b*x^2*y^2+c^2*y^4+x^3+2*c*x...

> sort(f,{x,y});

a^2*x^4*y^2+x^4*y^2+2*a*b*x^2*y^2+c^2*y^4+x^3+2*c*x...

collect

> collect(f,x);

(a^2*y^2+y^2)*x^4+x^3+(1+2*a*b*y^2)*x^2+(-4*y+2*c*y...

> collect(f,[x,y]);

(a^2+1)*y^2*x^4+x^3+(1+2*a*b*y^2)*x^2+(-4*y+2*c*y^2...

> collect(f,[x,y],distributed);

x^2+(a^2+1)*y^2*x^4+(b^2+4)*y^2+c^2*y^4-4*c*y^3-4*x...

> f:=expand((sin(x)-cos(x)^2)^2+(a-cos(x))^2);

f := sin(x)^2-2*sin(x)*cos(x)^2+cos(x)^4+a^2-2*cos(...

> sort(f,cos(x));

cos(x)^4-2*sin(x)*cos(x)^2+cos(x)^2-2*a*cos(x)+a^2+...

> collect(f,cos(x));

cos(x)^4+(1-2*sin(x))*cos(x)^2-2*a*cos(x)+a^2+sin(x...

> restart:

> f:=(y*diff(f1(x),x$2) + x*diff(f1(x),x$2));

f := y*diff(f1(x),`$`(x,2))+x*diff(f1(x),`$`(x,2))

> collect(f,diff);

(y+x)*diff(f1(x),`$`(x,2))

select, remove

> f:=expand((sin(x)-cos(x)^2)^2+(a-cos(x))^2);

f := sin(x)^2-2*sin(x)*cos(x)^2+cos(x)^4+a^2-2*cos(...

> select(has,f,a);

a^2-2*cos(x)*a

> select(has,f,cos(x)^2);

-2*sin(x)*cos(x)^2+cos(x)^2

> select(has,f,{cos(x)^2,sin(x)^2});

sin(x)^2-2*sin(x)*cos(x)^2+cos(x)^2

> f:=expand((x-y)^8);

f := x^8-8*x^7*y+28*x^6*y^2-56*x^5*y^3+70*x^4*y^4-5...

> select(p->degree(p,x)>4,f);

x^8-8*x^7*y+28*x^6*y^2-56*x^5*y^3

> remove(p->degree(p,x)>4,f);

70*x^4*y^4-56*x^3*y^5+28*x^2*y^6-8*x*y^7+y^8

> is(%+%%=f);

true

> selectremove(p->degree(p,x)>4,f);

x^8-8*x^7*y+28*x^6*y^2-56*x^5*y^3, 70*x^4*y^4-56*x^...

> select(has,sin(x)+cos(x),sin);

sin(x)

> select(has,sqrt(sin(x)+cos(x)),sin);

sin(x)+cos(x)

series

> expand((x^(1/2)+a)^3 + (x^(3/2)+b)^3);

x^(3/2)+3*x*a+3*sqrt(x)*a^2+a^3+x^(9/2)+3*x^3*b+3*x...

> series(%,x,20);

a^3+b^3+3*sqrt(x)*a^2+3*x*a+(1+3*b^2)*x^(3/2)+3*x^3...

Beispiele

Beispiel 1

> f:=diff(x/(1-sin(x)), x$3);

f := 6*cos(x)^2/((1-sin(x))^3)-3*sin(x)/((1-sin(x))...

> f1:=seq( select(p->has(p,1/(1-sin(x))^n), f), n=2..4);

f1 := -3*sin(x)/((1-sin(x))^2)-x*cos(x)/((1-sin(x))...

> convert( [seq(normal(p),p=[f1])] , `+`);

-(3*sin(x)+x*cos(x))/((-1+sin(x))^2)+6*cos(x)*(-cos...

> is(f=%);

true

Beispiel 2

> f:=int(1/(1+x^5),x);

f := 1/5*ln(x+1)-1/20*ln(2*x^2-x+sqrt(5)*x+2)+1/20*...
f := 1/5*ln(x+1)-1/20*ln(2*x^2-x+sqrt(5)*x+2)+1/20*...
f := 1/5*ln(x+1)-1/20*ln(2*x^2-x+sqrt(5)*x+2)+1/20*...

> f1:=collect(f,[ln,arctan]);

f1 := 1/5*ln(x+1)+(-1/20+1/20*sqrt(5))*ln(2*x^2-x+s...
f1 := 1/5*ln(x+1)+(-1/20+1/20*sqrt(5))*ln(2*x^2-x+s...
f1 := 1/5*ln(x+1)+(-1/20+1/20*sqrt(5))*ln(2*x^2-x+s...

> is(f1=f2);

FAIL

> is(evalf(f1)=evalf(f));

true

Beispiel 3

> restart: interface(imaginaryunit='j');

> Z:=beta/(omega*epsilon);

Z := beta/(omega*epsilon)

> Er:=Z*I*dl/(2*Pi*r^2)*(1+1/(j*beta*r))*exp(-j*beta*r)*cos(theta);

Er := 1/2*beta*I*dl*(1-I/(beta*r))*exp(-I*beta*r)*c...

> Er1:=select(x->not has(x,-j*beta*r), Er);

Er1 := 1/2*beta*I*dl*(1-I/(beta*r))*cos(theta)/(ome...

> Er2:=expand(Er1);

Er2 := 1/2*beta*I*dl*cos(theta)/(omega*epsilon*Pi*r...

> E_nah:=select(has, Er2, r^(-3));

E_nah := -1/2*I*I*dl*cos(theta)/(omega*epsilon*Pi*r...

> Er3:=expand(Er);

Er3 := 1/2*beta*I*dl*cos(theta)/(omega*epsilon*Pi*r...

> E_fern:=select(has,Er3,r^(-2));

E_fern := 1/2*beta*I*dl*cos(theta)/(omega*epsilon*P...

>

Zurück zum Inhaltsverzeichnis