16 years, 7 days

## A way...

Use the inert multiplication sign  %.  and  InertForm:-Display( ... , inert=false)  command so that the multiplication sign is not gray, but the usual blue color:

```restart;
U := <u1, u2>;
K := Matrix(2, 2, symbol = k);
K%.U;
InertForm:-Display(%, inert=false);
```

## A way...

The task is easily solved in Maple without any financial packages. In the code below, q means how many times the debt increases monthly, x means the monthly payment, and  p[n]  means debt at the end of the n-th month:

```restart;
q:=1+9/12/100:
p[1]:=120000*q-x:
for n from 2 to 30*12 do
p[n]:=p[n-1]*q-x;
od:
fsolve(p[30*12]=0);
```

965.5471403

## identify...

We can find all the solutions of this system with rational coefficients, depending on 6 parameters:

```restart;
eqs:=eval~(k[1]*x^3+k[2]*x^2*y+k[5]*x^2*z+k[3]*x*y^2+k[6]*x*y*z+k[8]*x*z^2+k[4]*y^3+k[7]*y^2*z+k[9]*y*z^2+k[10]*z^3,{{x=1,y=1,z=1},{x=RootOf(_Z^3-4*_Z^2+_Z+1,index=1),y=RootOf(_Z^3-4*_Z^2+_Z+1,index=2),z=RootOf(_Z^3-4*_Z^2+_Z+1,index=3)},{x=RootOf(_Z^3-4*_Z^2+_Z+1,index=2),y=RootOf(_Z^3-4*_Z^2+_Z+1,index=3),z=RootOf(_Z^3-4*_Z^2+_Z+1,index=1)},{x=RootOf(_Z^3-4*_Z^2+_Z+1,index=3),y=RootOf(_Z^3-4*_Z^2+_Z+1,index=1),z=RootOf(_Z^3-4*_Z^2+_Z+1,index=2)}}):
sol:=solve(eqs):
evalf[20](sol):
Sol:=identify(evalf[15](%));```

Edit. To obtain integer solutions, you can do

`isolve(Sol);`

## expand...

This can be done using one command  expand:

`x^(n-1)*(expand((n*x^n - 2*n*x^(n - 1) + x^n)/x^(n-1)));`

## A way...

This can be done in many ways. Here is one:

```restart;
L:=[["O",3.85090000,0.45160000,0.00120000],
["O",-2.59990000,1.40410000,-0.00180000],
["N",-1.57050000,-0.71710000,0.00010000],
["C",-0.20660000,-0.42310000,-0.00020000],
["C",0.22050000,0.90470000,0.00040000],
["C",0.72980000,-1.45700000,-0.00070000],
["C",1.58410000,1.19860000,0.00020000],
["C",2.09330000,-1.16290000,-0.00070000],
["C",2.52040000,0.16480000,-0.00030000],
["C",-2.64850000,0.17820000,0.00090000],
["C",-3.97350000,-0.54200000,0.00100000],
["H",-0.44360000,1.75770000,0.00120000],
["H",0.41130000,-2.49630000,-0.00100000],
["H",-1.80100000,-1.70860000,0.00010000],
["H",1.90530000,2.23700000,0.00090000],
["H",2.81800000,-1.97260000,-0.00080000],
["H",-4.06550000,-1.14630000,-0.90580000],
["H",-4.79040000,0.18440000,0.02880000],
["H",-4.04450000,-1.18860000,0.88020000],
["H",3.96500000,1.41760000,0.00170000]]:

k:=0: n:=nops(L):
for i from 1 to n do
if L[i,1]="H" then k:=k+1; S[i]:=i fi;
od:
S:=convert(S, list);```

S := [12, 13, 14, 15, 16, 17, 18, 19, 20]

## Workaround...

```expr := ``(a*f(x) + b*f(x) + a*g(x)) + 1/(a*f(x) + b*f(x) + a*g(x));
applyop(expand,1,simplify(expr));```

## select...

```restart;
T:=table([1 = NULL, 2 = NULL, 3 = NULL, 4 = NULL, 5 = NULL, 6 = NULL, 7 = 5, 9 = NULL, 8 = NULL, 11 = 4, 10 = NULL, 13 = NULL, 12 = NULL, 15 = 9, 14 = NULL, 18 = NULL, 19 = 8, 16 = 9, 17 = NULL, 22 = 9, 23 = NULL, 20 = NULL, 21 = 8, 27 = NULL, 26 = 8, 25 = 4, 24 = NULL, 31 = NULL, 30 = 9, 29 = NULL, 28 = 9, 36 = NULL, 37 = 9, 38 = 9, 39 = NULL, 32 = 5, 33 = NULL, 34 = NULL, 35 = NULL, 45 = NULL, 44 = NULL, 47 = NULL, 46 = NULL, 41 = 8, 40 = NULL, 43 = NULL, 42 = NULL, 54 = NULL, 55 = NULL, 52 = NULL, 53 = NULL, 50 = NULL, 51 = NULL, 48 = 5, 49 = 9, 60 = 8, 59 = NULL, 58 = 7, 57 = 7, 56 = NULL]):
T1:=table(select(t->rhs(t)<>NULL, op(op(T))));
op~([indices(T1)]);
```

## expand, irem...

```restart;
irem(expand((2 + sqrt(3))^15 + (2 - sqrt(3))^15), 2017);
```

685

This number  (2 + sqrt(3))^15 + (2 - sqrt(3))^15  is actually an integer. If you expand the brackets (raise to the 15th power), then all the square roots will disappear.

```restart;
V1:=Vector[row]([a*z+b*(x+I*y), -b*z+a*(x+I*y)]);
V2:=Vector([a*z+b*(x-I*y), -b*z+a*(x-I*y)]);
factor(evalc(V1.V2));
simplify(%, {a^2+b^2=1});
```

The  evalc  command allows you to operate on complex numbers, assuming all parameters (a, b, x, y, z) are real numbers. The signs of these parameters do not matter for this example.

## parentheses...

You missed 2 parentheses  draw( [ ... ] )

## combinat:-setpartition...

```restart:
S:= {"a", "b", "c", "d", "e", "f"}:
combinat:-setpartition(S, 3);```

{{{"a", "b", "c"}, {"d", "e", "f"}}, {{"a", "b", "d"}, {"c", "e", "f"}}, {{"a", "b", "e"}, {"c", "d", "f"}}, {{"a", "b", "f"}, {"c", "d", "e"}}, {{"a", "c", "d"}, {"b", "e", "f"}}, {{"a", "c", "e"}, {"b", "d", "f"}}, {{"a", "c", "f"}, {"b", "d", "e"}}, {{"a", "d", "e"}, {"b", "c", "f"}}, {{"a", "d", "f"}, {"b", "c", "e"}}, {{"a", "e", "f"}, {"b", "c", "d"}}}

## Specify the polynomial as a function. He...

Specify the polynomial as a function. Here is an example:

```restart;
P:=(a,b,c)->a^3-a^2*b+b*c;
P(b,a,c);```

## lightmodel...

Use the  lightmodel  option. Compare 2 examples:

```plot3d(x^2-y^2, x=-1..1, y=-1..1, lightmodel=light1);
plot3d(x^2-y^2, x=-1..1, y=-1..1, lightmodel=light2);
```

## Domains of functions...

When solving equations or inequalities in the real domain, it is better to immediately include conditions on the domains of functions present in this system into the system:

```restart;
eqn:= log[2](x^2 - 6*x) = 3 + log[2](1 - x);
ans:=solve({eqn, x^2 - 6*x>0, 1-x>0}, x);
```

## fsolve...

Use the  fsolve command for this.  The function  f(n) = 10^n /n!  is decreasing for  n>10 :

 > restart; epsilon:=0.001; f:=n->10^n /n!: N:=fsolve(f(n)= epsilon, n=1..infinity); plot([f(n),epsilon], n=25..N+2, 0..0.005, color=[red,blue]); # Visual check
 >

So should be  N>=32