Kitonum

19074 Reputation

26 Badges

14 years, 149 days

MaplePrimes Activity


These are answers submitted by Kitonum

restart; 
expr:=[[(-.684-1.08*r+6.1*r^2-2*r^3+0.36e-1*ln(10.*r)-.3*r^2*ln(10.*r))/(-1.14+1.2*r+0.6e-1*ln(10.*r)), 1.290994449*sqrt((-.1296*r+1.512*r^2-.36*r^3+6.1*r^4-2*r^5-0.72e-1*r^2*ln(10.*r)-.3*r^4*ln(10.*r)+(-.684-1.08*r+6.1*r^2-2*r^3+0.36e-1*ln(10.*r)-.3*r^2*ln(10.*r))*(.216*r-2.52*r^2+.12*r^2*ln(10.*r))/(-1.14+1.2*r+0.6e-1*ln(10.*r)))/(-1.14+1.2*r+0.6e-1*ln(10.*r)))], [(-.684-1.08*r+6.1*r^2-2*r^3+0.36e-1*ln(10.*r)-.3*r^2*ln(10.*r))/(-1.14+1.2*r+0.6e-1*ln(10.*r)), -1.290994449*sqrt((-.1296*r+1.512*r^2-.36*r^3+6.1*r^4-2*r^5-0.72e-1*r^2*ln(10.*r)-.3*r^4*ln(10.*r)+(-.684-1.08*r+6.1*r^2-2*r^3+0.36e-1*ln(10.*r)-.3*r^2*ln(10.*r))*(.216*r-2.52*r^2+.12*r^2*ln(10.*r))/(-1.14+1.2*r+0.6e-1*ln(10.*r)))/(-1.14+1.2*r+0.6e-1*ln(10.*r)))]]:

plot([seq([expr[j][], r = 0 .. 1], j = 1 .. 2)], color = blue, numpoints=1000);

 

Here's a straight forward solution that doesn't use any special formulas.

Let us denote by  x  the number of students who made only the 1st and 3rd trips, by  y - only the 1st and 2 trips, by  z - only the 2nd and 3rd trips. In total we have  x+y+z+160  students at this School. The problem is reduced to solving a system of 3 equations with 3 unknowns:
 

restart;
Total:=x+y+z+160:
solve({x+160+y=50/100*Total, y+160+z=80/100*Total, z+160+x=90/100*Total});
eval(Total, %);

                               

 

 

restart;
convert((3*n-8)/(n-3), parfrac);

                                                   

 

Colors are encoded as integers from 1 to 5.

restart;
L:=[seq(i$4, i=1..5)]:
P:=combinat:-permute(L,4):
k:=0:
for p in P do
if p[1]<>p[2] and p[2]<>p[3] and p[3]<>p[4] and p[4]<>p[1] 
then k:=k+1 fi;
od: 
k;

                                                                       260

Since  C=Pi-A-B , we have the problem of finding the minimum (or maximum) of a continuous function of two variables in a closed bounded area (this is a triangle  EFG  in the figure below). mmcdara showed that this function has no critical points in this region, so the minimum (or maximum) is necessarily reached at the boundary of the region. Therefore, the problem is reduced to finding the minimum of a function of one variable on the segments  EG, EF  and  FG .

The worksheet is not loading for some reason, so see the link below.

We see that the minimum is equal to 1/4 and is reached at the points  E(Pi/3, Pi/3)  and  G(Pi/2, Pi/4) , but if  A<Pi/2 , then only at the point  E .
 

Download problem.mw

restart;
P:=map(p->convert(p,Matrix,3,3), combinat:-permute([0$9,1$9],9)):
n:=0:
for p in P do
S:=convert~([p[1],p[2],p[3],p[..,1],p[..,2],p[..,3]],set);
if andmap(t->{0,1} subset t, S) then n:=n+1 fi;
od:
n;

                                                                    102

Unfortunately, Maple doesn't think to simplify the sum of the first and third terms after the simplification, but we can tell him to do so:

restart;
Expr:=G1*P3 + G1*P5 + G1*P6 + G2*P3 + G2*P6 + G3*P2 + G3*P5 + G4*P2 + G4*P3 + G4*P5 + G4*P6 + G5*P2 + G5*P3 + G5*P5 + G5*P6 + G6*P3 + G6*P6 + G7*P2 + G7*P5 + G8*P2 + G8*P3 + G8*P5 + G8*P6;
Expr1:=simplify(Expr);
L:=[op(Expr1)]:
t:=op(1,L)+op(3,L):
factor(t)+simplify(Expr-t); # The final result

G1*P3+G1*P5+G1*P6+G2*P3+G2*P6+G3*P2+G3*P5+G4*P2+G4*P3+G4*P5+G4*P6+G5*P2+G5*P3+G5*P5+G5*P6+G6*P3+G6*P6+G7*P2+G7*P5+G8*P2+G8*P3+G8*P5+G8*P6

 

(G1+G2+G4+G5+G6+G8)*P3+(G1+G3+G4+G5+G7+G8)*P5+(G1+G2+G4+G5+G6+G8)*P6+P2*(G3+G4+G5+G7+G8)

 

(G1+G2+G4+G5+G6+G8)*(P3+P6)+(G1+G3+G4+G5+G7+G8)*P5+P2*(G3+G4+G5+G7+G8)

(1)

 

Download simplification.mw

If we want the number  n  to match the number of petals, then

restart;
Rose:= (n::integer)-> plots:-polarplot(`if`(n::even,sin(n/2*t),sin(n*t)), filled, color= `if`(n::odd, pink, aquamarine)):

Rose(4);  Rose(3); # Examples

 

@mylikes  You didn't specify your version of Maple. It's probably a pretty old version if your code doesn't work. Try the two options below. The first option is the standard way to calculate the double integral. If it doesn't work, then try the second option, which reduces the double integral to a repeated one:
 

restart;
r:=-36*u^3*v*(-1 + u + v)*(3*u^2 + u*v - 5*u - 2*v + 2)/(-1 + u)^2;
int(r, [u=0..1-v, v=0..1]); # The first option
int(int(r, u=0..1-v), v=0..1);  # The second option

 

Examples:

ilog10(10110)+1;
ilog10(111010110)+1;

                                                        5
                                                        9

restart;
de := plot3d(y*sin(x), x = 0 .. 2*Pi, y = -2 .. 2):
plottools:-getdata(de);

 

restart;
ell:=(9/4)*X^2+9*Y^2=1;
a:=sqrt(1/coeff(lhs(ell),X^2));
b:=sqrt(1/coeff(lhs(ell),Y^2));
max(2*a,2*b); # Major axis
min(2*a,2*b); # Minor axis

                       

 

 

 

restart;
z1:=2+3*I:
z2:=I:
op(z1);
op(z2);

                                                                         2, 3
                                                                          1

A reliable way to iterate over the sum of multiple terms is to simply make those terms elements of a list.

restart:
with(plottools): with(plots):
u:=[2,2]: v:=[2,-1]:
G1:=seq(line(-5*u+t*v,5*u+t*v,linestyle=2), t=-5..5):
G2:=seq(line(s*u-5*v,s*u+5*v,linestyle=2), s=-5..5):
U:=arrow(u, color=red, width=0.2):
V:=arrow(v, color=red, width=0.2):
plots:-display(U,V,G1,G2, size=[700,700], scaling=constrained, axes=none);
    

We have to use the  parametric  option:

restart;
solve({-x1+2*x2+(2-p)*x3=0,(2-p)*x2+x3=2, (1-p)*x1+2*x2+2*x3=p+3}, {x1,x2,x3}, parametric=true):
value(%);

   

1 2 3 4 5 6 7 Last Page 1 of 272