MAPLE PCSI 2002/2003

Episode 1 : mise en route

Exo 2

> 2+2;

4

> 1234^1234;

481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...
481844677813825437016671860394684066610597702375902...

> 5/3+21/10;

113/30

> 5/3+2.1;

>

3.766666667

> pi;Pi;

pi

Pi

> cos(pi);cos(Pi);

cos(pi)

-1

> cos(3.14);cos(3.141592654);

-.9999987317

-1.

> if (3+3=7) then isprime(1789) else ithprime(1789) fi;

15313

> if (3+3=6) then isprime(1789) else ithprime(1789) fi;

true

Exo 3

> solve({2*x+2*y-3*z=2,-2*x-y-3*z=-5,6*x+4*y+4*z=16},{x,y,z});

{z = 4, y = 21, x = -14}

> solve({x+y+z+t=4,-x+y+2*z+t=2,2*x+y+3*z-t=-1,y+4*z-t=-3},{x,y,z,t});

{x = 1+1/2*z, t = 3+5/4*z, y = -11/4*z, z = z}

> solve({x+y+z+t=4,-x+y+2*z+t=2,2*x+y+3*z-t=-1,y+4*z-t=4},{x,y,z,t});

pas de solution ...

Exo 4

> equa:=diff(y(t),t)+3*y(t)=2*t+3*t^2*exp(-3*t);

equa := diff(y(t),t)+3*y(t) = 2*t+3*t^2*exp(-3*t)

> dsolve(equa);

y(t) = exp(-3*t)*t^3+2/3*t-2/9+exp(-3*t)*_C1

> subs(%,equa);

diff(exp(-3*t)*t^3+2/3*t-2/9+exp(-3*t)*_C1,t)+3*exp...

> simplify(%);

2*t+3*t^2*exp(-3*t) = 2*t+3*t^2*exp(-3*t)

> evalb(%);

true

Exo 5

> evalf(Pi,50);

3.1415926535897932384626433832795028841971693993751...

Exo 6

> sum(k^3,k=0..50);

1625625

> sum(k^3,k=0..n);

1/4*(n+1)^4-1/2*(n+1)^3+1/4*(n+1)^2

> factor(%);

1/4*n^2*(n+1)^2

Exo 7

> x=7;

x = 7

> x;

x

> x+2;

x+2

> 7=x;

7 = x

> x;

x

> x:=7;

x := 7

> x;

7

> x+2;

9

> 7:=x;

Error, invalid left hand side of assignment

> x=9;

7 = 9

> evalb(x=9);

false

Exo 8

> x:=7;

x := 7

> x+2;

9

> X+2;

X+2

Exo 9

> toto;

toto

> digits;

digits

> Digits;

10

> Digits:=23;

Digits := 23

> evalf(Pi);

3.1415926535897932384626

Exo 10

> f1:=x->2*x^2-3;

f1 := proc (x) options operator, arrow; 2*x^2-3 end...

> f2:=x->exp(tan(x));

f2 := proc (x) options operator, arrow; exp(tan(x))...

> f3:=x->x^5*sin(x)+x^4*exp(-3*x);

f3 := proc (x) options operator, arrow; x^5*sin(x)+...

> f4:=x->ln(x^2+x/(cos(x)));

f4 := proc (x) options operator, arrow; ln(x^2+x/co...

Exo 11

> plot(f1);

[Maple Plot]

> plot(f2,-1.55..1);

[Maple Plot]

Exo 12

> plot({x^2,x^4,x,sqrt(x),x^(1/3)},x=1..3,y=1..5);

[Maple Plot]

> plot({x^2,x^4,x,sqrt(x),x^(1/3)},x=0..1);

[Maple Plot]

Exo 13

> D(f1)(3);

12

Exo 14

> f:=x->x^40*exp(-1/x);

f := proc (x) options operator, arrow; x^40*exp(-1/...

> diff(f(x),x$50);

-909171781056000/x^51*exp(-1/x)+194822524512000/x^5...
-909171781056000/x^51*exp(-1/x)+194822524512000/x^5...

> simplify(%);

-exp(-1/x)*(909171781056000*x^9-194822524512000*x^8...

Exo 15

> limit(ln(1+x)/(x+tan(x)),x=0);

1/2

Exo 16

> limit(f2(x),x=Pi/2);

undefined

> limit(f2(x),x=Pi/2,left);

infinity

> limit(f2(x),x=Pi/2,right);

0

Exo 17

> limit((1+1/n)^n,n=infinity);

exp(1)

> limit((1+1/n^2)^n,n=infinity);

1

> limit((1+1/n)^(n^2),n=infinity);

infinity

> limit((1+1/n^2)^(n^2),n=infinity);

exp(1)

Exo 18

> g:=x->sqrt(x^2+3*x+2);

g := proc (x) options operator, arrow; sqrt(x^2+3*x...

> limit(g(x)/x,x=infinity);

1

> limit(g(x)-x,x=infinity);

3/2

> plot({g(x),x+3/2},x=-4..2,y=-3..3);

[Maple Plot]

> asympt(g(x),x,3);

x+3/2-1/8*1/x+3/16/x^2+O(1/(x^3))

Exo 19

> int(x,x=0..1);

1/2

> int(x,x=1..2);

3/2

> int(x,x=2..3);

5/2

Exo 20

> int(sin(x)*cos(x)/(sin(x)^4+cos(x)^4),x=0..1);

>

1/4*I*ln(tan(1/2)^4+1-2*tan(1/2)^2-4*I*tan(1/2)^2)-...

> simplify(%);

1/2*arctan(4*tan(1/2)^2/(tan(1/2)^4+1-2*tan(1/2)^2)...

Exo 21

> int(f3(x),x);

-x^5*cos(x)+5*x^4*sin(x)+20*x^3*cos(x)-60*x^2*sin(x...

Exo 22

> int(exp(-x^2),x=0..infinity);

1/2*sqrt(Pi)