examen.mws

Model 47132

Problema 1)

> restart;

1a)

> with(geometry):

> talls:=proc(c,r)
local p;
intersection(p,c,r):
if nops(p)=0 then
print("No es tallen");
elif nops(p)=1 then
print("Es tallen en un punt");
elif nops(p)=2 then
print("Es tallen en dos punts");
end if;
end proc;

>

talls := proc (c, r) local p; intersection(p,c,r); ...
talls := proc (c, r) local p; intersection(p,c,r); ...
talls := proc (c, r) local p; intersection(p,c,r); ...
talls := proc (c, r) local p; intersection(p,c,r); ...
talls := proc (c, r) local p; intersection(p,c,r); ...

1b)

> circle(c,[point(A,1,3),2],[x,y]);

c

> detail(c);

`name of the object:  c\nform of the object:  circl...
`name of the object:  c\nform of the object:  circl...
`name of the object:  c\nform of the object:  circl...
`name of the object:  c\nform of the object:  circl...
`name of the object:  c\nform of the object:  circl...
`name of the object:  c\nform of the object:  circl...

> line(l,2*x-y-1=0,[x,y]);

l

> detail(l);

`name of the object:  l\nform of the object:  line2...
`name of the object:  l\nform of the object:  line2...
`name of the object:  l\nform of the object:  line2...

> talls(c,l);

1c)

> intersection(p,c,l);

[l_intersect1_c, l_intersect2_c]

> detail(p);

[`name of the object:  l_intersect1_c\nform of the ...
[`name of the object:  l_intersect1_c\nform of the ...
[`name of the object:  l_intersect1_c\nform of the ...
[`name of the object:  l_intersect1_c\nform of the ...
[`name of the object:  l_intersect1_c\nform of the ...

> draw([c(color=blue),l,p[1](color=black),p[2](color=black)]);

[Maple Plot]

Problema 2)

> restart;

> plot(ln(x)-1/4*x,x=0..20);

[Maple Plot]

> sol1:=evalf(fsolve(ln(x)=1/4*x,x=0..4),15);

sol1 := 1.42961182472556

> sol2:=evalf(fsolve(ln(x)=1/4*x,x=8..10),15);

sol2 := 8.61316945644140

> fsolve(ln(x)=1/4*x,x=10..infinity);

fsolve(ln(x) = 1/4*x,x,10 .. infinity)

Model 39051

Problema 1)

> restart;

1a)

> with(LinearAlgebra):

> solucions:=proc(M,k)
local sol;
sol:=LinearSolve(M-k*IdentityMatrix(RowDimension(M)),ZeroMatrix(RowDimension(M),1)):
if IsMatrixShape(sol, zero)=true then
[];
else
sol;
end if;
end proc;

solucions := proc (M, k) local sol; sol := LinearAl...
solucions := proc (M, k) local sol; sol := LinearAl...
solucions := proc (M, k) local sol; sol := LinearAl...
solucions := proc (M, k) local sol; sol := LinearAl...
solucions := proc (M, k) local sol; sol := LinearAl...
solucions := proc (M, k) local sol; sol := LinearAl...

1b)

> M:=<<1|-2|1>,<2|-1|-1>,<-1|2|1>>;

M := _rtable[4350084]

> solucions(M,1);

_rtable[5129092]

> solucions(M,2);

[]

Problema 2)

> restart;

> a:=n->(n^n*sqrt(n))/((n)!*exp(n));

a := proc (n) options operator, arrow; n^n*sqrt(n)/...

> a(1);

1/exp(1)

> a(2);

2*2^(1/2)/exp(2)

> evalf(a(15));

.3967324057

> l:=limit(a(n),n=infinity);

l := 1/2*2^(1/2)/Pi^(1/2)

> with(plots):

Warning, the name changecoords has been redefined

> dib1:=plot(l,x=0..16,colour=green):

> dib2:=plot([seq([n,a(n)],n=1..15)],style=point,colour=blue):

> display([dib1,dib2]);

[Maple Plot]

Model 86183

Problema 1)

> restart;

1a)

> suc:=proc(n)
local i,a,b;
if n<1 then
print("n ha de ser mÈs gran o igual que 1");
elif n=1 then
a:=10:
else
a:=10:
for i from 2 to n do
b:=(a^2+7)/(2*a):
a:=b:
end do;
end if;
evalf(a,20);
end proc;

suc := proc (n) local i, a, b; if n < 1 then print(...
suc := proc (n) local i, a, b; if n < 1 then print(...
suc := proc (n) local i, a, b; if n < 1 then print(...
suc := proc (n) local i, a, b; if n < 1 then print(...
suc := proc (n) local i, a, b; if n < 1 then print(...

> suc(1);

10.

> suc(2);

5.3500000000000000000

1b)

> for i from 1 while (evalf(abs(suc(i+1)-suc(i)))>10^(-7)) do

> i;
end do;

>

1

2

3

4

5

6

> evalf(abs(suc(7+1)-suc(7)),15);

.1e-13

> evalf(suc(8));

2.645751311

> evalf(sqrt(7));

2.645751311

Problema 2)

> restart;

> with(LinearAlgebra):

> M:=<<1|2-a|-2+3*a|2-a+2*a^2>,<2|1+a|-1-2*a|4+a-a^2>,<3|4-a|-4+3*a|6-a+2*a^2>>;

M := _rtable[4491548]

> RowOperation(M,[2,1],-2,inplace);

_rtable[4491548]

> RowOperation(M,[3,1],-3,inplace);

_rtable[4491548]

> RowOperation(M,[3,2],-2/3,inplace);

_rtable[4491548]

> M0:=subs(a=0,M);

M0 := _rtable[4630212]

> LinearSolve(M0[1..3,1..3],M0[1..3,4]);

_rtable[4789176]

Per a=0 es sistema compatible indeterminat

> M1:=subs(a=1,M);

M1 := _rtable[4761916]

> LinearSolve(M1[1..3,1..3],M1[1..3,4]);

Error, (in LinearAlgebra:-LA_Main:-LinearSolve) inconsistent system

Per a=1 es un sistema incompatible

> LinearSolve(M[1..3,1..3],M[1..3,4]);

_rtable[4916000]

Per a<>0 i a<>1 Ès compatible determinat.

Model 30970

Problema 1)

> plot([(ln(x))^4,x],x=0..10,y=0..20);

[Maple Plot]

> sol1:=evalf(fsolve(ln(x)^4=x,x=0..1),15);

sol1 := .442394430203601

> sol2:=evalf(fsolve(ln(x)^4=x,x=3..5),15);

sol2 := 4.17707743900016

> sol3:=evalf(fsolve(ln(x)^4=x,x=5..10000),15);

sol3 := 5503.66468907672

> fsolve(ln(x)^4=x,x=5504..infinity);

fsolve(ln(x)^4 = x,x,5504 .. infinity)

> plot([(ln(x))^4,x],x=5503..5504);

[Maple Plot]

Problema 2)

> restart;

> with(geometry):

> configuracio:=proc(P,r,argument)
local l;
if argument<>1 and argument<>-1 then
print("El tercer parametre ha de valer 1 o -1");
elif argument=1 then
PerpendicularLine(l,P,r):
draw([l(color=blue),P,r(color=green)]);
elif argument=-1 then
ParallelLine(l,P,r):
draw([l(color=blue),P,r(color=green)]);
end if;
end proc;

configuracio := proc (P, r, argument) local l; if a...
configuracio := proc (P, r, argument) local l; if a...
configuracio := proc (P, r, argument) local l; if a...
configuracio := proc (P, r, argument) local l; if a...
configuracio := proc (P, r, argument) local l; if a...
configuracio := proc (P, r, argument) local l; if a...
configuracio := proc (P, r, argument) local l; if a...

> point(P,3,1);

P

> detail(P);

`name of the object:  P\nform of the object:  point...
`name of the object:  P\nform of the object:  point...
`name of the object:  P\nform of the object:  point...

> line(r,x-y+2=0,[x,y]);

r

> detail(r);

`name of the object:  r\nform of the object:  line2...
`name of the object:  r\nform of the object:  line2...
`name of the object:  r\nform of the object:  line2...

> configuracio(P,r,1);

[Maple Plot]

Model 94264

Problema 1)

1a)

> restart;

> with(geometry):

> talls:=proc(C1,C2)
local In;
if center(C1)=center(C2) and radius(C1)=radius(C2) then
printf("Les dues circumferencies son la mateixa");
else
intersection(In,C1,C2):
printf("El numero de punts de tall es:");
nops(In);
end if;
end proc;

>

talls := proc (C1, C2) local In; if center(C1) = ce...
talls := proc (C1, C2) local In; if center(C1) = ce...
talls := proc (C1, C2) local In; if center(C1) = ce...
talls := proc (C1, C2) local In; if center(C1) = ce...
talls := proc (C1, C2) local In; if center(C1) = ce...
talls := proc (C1, C2) local In; if center(C1) = ce...

1b)

> point(A,1,3);

A

> circle(C1,[A,2]);

C1

> circle(C2,x^2+y^2-2*x+2*y-2=0,[x,y]);

C2

> detail(C1); detail(C2);

assume that the names of the horizontal and vertical axes are _x and _y, respectively

`name of the object:  C1\nform of the object:  circ...
`name of the object:  C1\nform of the object:  circ...
`name of the object:  C1\nform of the object:  circ...
`name of the object:  C1\nform of the object:  circ...
`name of the object:  C1\nform of the object:  circ...
`name of the object:  C1\nform of the object:  circ...

`name of the object:  C2\nform of the object:  circ...
`name of the object:  C2\nform of the object:  circ...
`name of the object:  C2\nform of the object:  circ...
`name of the object:  C2\nform of the object:  circ...
`name of the object:  C2\nform of the object:  circ...
`name of the object:  C2\nform of the object:  circ...

> talls(C1,C2);

El n™mero de punts de tall Ès:

1

1c)

> intersection(In,C1,C2);

In

> draw([C1(color=blue),C2(color=green),In(color=black)]);

[Maple Plot]

Problema 2)

> restart;

> x:=n->(1/sqrt(n))*(product(2*i,i=1..n)/product(2*i-1,i=1..n));

x := proc (n) options operator, arrow; 1/sqrt(n)*pr...

> limit(x(n),n=infinity);

sqrt(Pi)