## 15584 Reputation

12 years, 146 days

## Plotting...

```restart;
lambda:=x+I*y:
evalc(abs(1+1/3*lambda+1/18*lambda^2-1/324*lambda^3+1/1944*lambda^4)-1);
plots:-implicitplot(%, x=-15..15, y=-15..15, gridrefine=5, scaling=constrained, size=[550,550]);```

Edit. It would be interesting to show that the curves on the right (bottom and top) are exact circles (this is my assumption) and learn their equations.

The following is working:

 > restart; P1:=(r,R)->(2/Pi)*(arccos(r/(2*R))-(r/(2*R))*sqrt(1-(r/(2*R))^2)); J0:=(r,shk)->BesselJ(0, 2*Pi*r*shk); Jhk:=unapply(evalf((1/s)*Int(P1(r,R)*J0(r,shk)*sin(2*Pi*r*s), r=0..2*R)),s,shk,R); plot(Jhk(s,2.14,38), s=0..5, numpoints=200, size=[1000,300]);
 >

 (1)

 (2)

 (3)

 (4)

## The order of arguments...

You have mixed up the order of arguments for  Normal(mu, sigma) . The first argument  mu  is the mean, and the second one  sigma  is the standard deviation.

Solution:

```restart;
with(Statistics):
X := RandomVariable(Normal(mu, 10));
dummy := int(PDF(X,u), u = -infinity .. 500);
fsolve(dummy = 0.05, mu=500..infinity);
```

516.4485363

Within the meaning of the task for the probability to be <=0.05 ,  should be  mu >= 516.4485363

Temperature over 24hr period

 (1)

plot(y);

It corrected in Maple 2018.2:

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

 (10)

 (11)

 (12)

## 2020...

Such a year will be only one. This is the year  2020 .

```restart;
with(LinearAlgebra):
k:=0: T:=table():
for i from 2001 to 2100 do
L:=convert(i,base,10);
R,A,E,Y:=L[];
M:=<Y,E,A,R; E,A,R,Y; A,R,Y,E; R,Y,E,A>;
N:=<M | <2,0,2,0>>;
m:=Rank(M); n:=Rank(N);
if m<4 then if m=n then k:=k+1; T[k]:=Y*10^3+E*10^2+A*10+R fi;fi;
od:
YEARs:=convert(T,list); ```

YEARs := [2020]

Edit. As Thomas Dean pointed out in his comment, replacing the vector  <2,0,2,0>  in the code with the vector  <Y,E,A,R>  allows you to get a larger number of solutions.

## Comparisons...

Compare these options:

```restart;
data:=[\$1..10^6]:
CodeTools:-Usage(is(numelems(data)<>0));
CodeTools:-Usage(is(data<>[]));
CodeTools:-Usage(is(nops(data)<>0));
CodeTools:-Usage(is(not (data::[])));
```

I usually use the  nops  command.

## expand, assuming...

`expand(exp(k*(ln(t)+ln(a)))-(exp(ln(t)+ln(a)))^k) assuming t > 0, a > 0;`

0

1. Maple often calculates the sum of divergent series in a special sense. For instance

```evalf(sum((-1)^(n+1),n=1..infinity));
```

0.5000000000

See help on  sum,details  and  wiki  https://en.wikipedia.org/wiki/Divergent_series  for details.

2. When you calculate  limit((-1)^n, n=infinity) , then n is not necessarily an integer, for example

`(-1)^2.7;`

-0.5877852523 + 0.8090169944*I

## Two ways...

```L := [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
Vector(5, i->L[2*i-1]..L[2*i]); # As a vector
[seq(%)]; # As a list```

## One inconsistent system...

Just solve everything as one system. Such systems are usually inconsistent, as there are more conditions (equations) than unknowns:

```restart;
sys := [.8164965809*c[1]+101.3127271*c[3]-2.479560632 = 0., .7071067810*c[1]+1.414213562*c[2]+146.5538537*c[3]-2.772453851 = 0.,c[1]-2*c[2]+3*c[3] = sqrt(Pi), 4*c[2]-16*c[3] = (1/2)*sqrt(Pi), c[1]+2*c[2]+3*c[3] = sqrt(2)*sqrt(Pi)]:
A, V:=LinearAlgebra:-GenerateMatrix(sys, [c[1],c[2],c[3]]);
LinearAlgebra:-LinearSolve(A, V);
```

## plots...

An easy way to solve the problem is to use the plots package tools for this:

```with(plots):
A:=plot([cos(t),sin(t),t=0..2*Pi], color=black):
B:=pointplot([seq([cos(2*Pi*k/5),sin(2*Pi*k/5)],k=0..4)], symbol=solidcircle, color=grey, symbolsize=60):
T:=textplot([seq([cos(2*Pi*(k-1)/5),sin(2*Pi*(k-1)/5),k],k=1..5)], font=[times,20]):
display(A,B,T, size=[500,500], axes=none);
```

## simplify, assuming, is...

Shortly:

```restart;
simplify(f*sqrt(g/f))  assuming g>=0,f>0;
is(sqrt(g)*sqrt(f)=f*sqrt(g/f))  assuming g>=0,f>0;
```

sqrt(g)*sqrt(f)
true

## A way...

EXAMPLE 8 Interior Design Services Employees

For 2007:

=  thousand employees

For 2011:

=  thousand employees