## 19675 Reputation

15 years, 146 days

## Solution...

We reduce the solution of the problem to the solution of a system of 4 equations with 4 unknowns. Unfortunately the  solve  command does not give an explicit result. We use the  fsolve  command, getting the result with high precision. The  identify  command gives a symbolic expression for the answer, that is, the length of AB is 28/3 cm

restart;
local D:
A:=<x,y>: B:=<-b,0>: C:=<c,0>: D:=<0,0>:
L:=X->sqrt(X[1]^2+X[2]^2):
Dist:=(X,Y)->L(X-Y):
Angle:=(X,Y)->arccos(X.Y/L(X)/L(Y)):
Digits:=50:
fsolve(Sys, {x=0..infinity,y=0..infinity,b=0..infinity,c=0..infinity});
eval(Dist(A,B),%);
identify(%);

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);

## Solution...

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, %);

## convert( ... , parfrac)...

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

## Solution with Maple...

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

## Solution...

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 .

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 .

## Solution...

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

## A way...

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
 (1)
 >

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

## Two options...

@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

## ilog10...

Examples:

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

5
9

## plottools:-getdata...

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

## Without the geometry package...

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

## The reason...

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.

## seq, plottools:-line, plots:-arrow...

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);

 4 5 6 7 8 9 10 Last Page 6 of 277
﻿