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;
>
1b)
> circle(c,[point(A,1,3),2],[x,y]);
> detail(c);
> line(l,2*x-y-1=0,[x,y]);
> detail(l);
> talls(c,l);
1c)
> intersection(p,c,l);
> detail(p);
> draw([c(color=blue),l,p[1](color=black),p[2](color=black)]);
Problema 2)
> restart;
> plot(ln(x)-1/4*x,x=0..20);
> sol1:=evalf(fsolve(ln(x)=1/4*x,x=0..4),15);
> sol2:=evalf(fsolve(ln(x)=1/4*x,x=8..10),15);
> 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;
1b)
> M:=<<1|-2|1>,<2|-1|-1>,<-1|2|1>>;
> solucions(M,1);
> solucions(M,2);
Problema 2)
> restart;
> a:=n->(n^n*sqrt(n))/((n)!*exp(n));
> a(1);
> a(2);
> evalf(a(15));
> l:=limit(a(n),n=infinity);
> 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]);
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(1);
> suc(2);
1b)
> for i from 1 while (evalf(abs(suc(i+1)-suc(i)))>10^(-7)) do
>
i;
end do;
>
> evalf(abs(suc(7+1)-suc(7)),15);
> evalf(suc(8));
> evalf(sqrt(7));
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>>;
> RowOperation(M,[2,1],-2,inplace);
> RowOperation(M,[3,1],-3,inplace);
> RowOperation(M,[3,2],-2/3,inplace);
> M0:=subs(a=0,M);
> LinearSolve(M0[1..3,1..3],M0[1..3,4]);
Per a=0 es sistema compatible indeterminat
> M1:=subs(a=1,M);
> 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]);
Per a<>0 i a<>1 Ès compatible determinat.
Model 30970
Problema 1)
> plot([(ln(x))^4,x],x=0..10,y=0..20);
> sol1:=evalf(fsolve(ln(x)^4=x,x=0..1),15);
> sol2:=evalf(fsolve(ln(x)^4=x,x=3..5),15);
> sol3:=evalf(fsolve(ln(x)^4=x,x=5..10000),15);
> fsolve(ln(x)^4=x,x=5504..infinity);
> plot([(ln(x))^4,x],x=5503..5504);
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;
> point(P,3,1);
> detail(P);
> line(r,x-y+2=0,[x,y]);
> detail(r);
> configuracio(P,r,1);
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;
>
1b)
> point(A,1,3);
> circle(C1,[A,2]);
> circle(C2,x^2+y^2-2*x+2*y-2=0,[x,y]);
> detail(C1); detail(C2);
assume that the names of the horizontal and vertical axes are _x and _y, respectively
> talls(C1,C2);
El n™mero de punts de tall Ès:
1c)
> intersection(In,C1,C2);
> draw([C1(color=blue),C2(color=green),In(color=black)]);
Problema 2)
> restart;
> x:=n->(1/sqrt(n))*(product(2*i,i=1..n)/product(2*i-1,i=1..n));
> limit(x(n),n=infinity);