## 20134 Reputation

15 years, 284 days

## Inequality with a parameter...

You are actually solving the inequality with a parameter ( t1 is a parameter). I don't know about the latest versions, but Maple 2018 does not support this, an error message appears:

```restart;
solve((4*t1+4*sqrt(t1^2-4*t2))>0,t2, allsolutions, parametric=true);```

Error, (in solve) invalid input: SolveTools:-SemiAlgebraic expects its 1st argument, osys, to be of      type ({list, set})({ratpoly(rational), ratpoly(rational) = ratpoly(rational), ratpoly(rational) <> ratpoly(rational), ratpoly(rational) <= ratpoly(rational), ratpoly(rational) < ratpoly(rational)}), but received {0 < 4*t1+4*(t1^2-4*t2)^(1/2)}

## Solution...

The problem is solved with good accuracy by reducing to a system of 4 equations with 4 unknowns:

 > restart; f:=(x1,x2)->4*(x1-0.25)^4-x1^2*x2^2+(x2-0.25)^4-1.21: P:=plots:-implicitplot(f, -2..2, -2..2, color=blue, scaling=constrained): S:=[seq([x0,y0]+~d*~[cos(t+Pi/2*k),sin(t+Pi/2*k)], k=0..3)]; fsolve({seq(f(S[i][]), i=1..4)}, {x0=-2..2,y0=-2..2,t=0..2*Pi,d=0..2}); S:=eval(S, %); plots:-display(P, plottools:-polygon(S, style=line, color=red)); Dist:=(X,Y)->sqrt((X[1]-Y[1])^2+(X[2]-Y[2])^2): seq(Dist(S[i],S[i+1]), i=1..3),Dist(S[1],S[4]); # Side lengths of the square
 (1)
 >

## convert...

I do not see any problems in this to waste my time on such manipulations. If anyone likes one form, then he can easily switch to it using the  convert  command.

Examples:

```restart;
convert(sec(x), sincos);
convert(csc(x), sincos);
convert(tan(x), sincos);
convert(sin(x)/cos(x), tan);
```

## plots:-animate...

```P:=a->plots:-display(
tubeplot([seq](L(s)), s=-2..2.5, radius=0.08, color="Red"),   # the line L
tubeplot([seq](C(s)), s=-4*Pi..4*Pi, radius=0.08, color="Green", numpoints=200), # the curve C
plot3d(S(s,t), s=-4*Pi..4*Pi, t=0..a, color="Gold", grid=[80,25]),
scaling=constrained, style=patch, lightmodel=light4,
orientation=[-120,75,0], labels=[x,y,z], axes=framed):

plots:-animate(P,[a], a=0..2*Pi, frames=90);
```

## Two surfaces...

 > restart; lambda1:=-sqrt(64-mu^2): lambda2:=sqrt(64-mu^2): plot3d([[lambda1-lambda1*t,mu*t,3-6*t],[lambda2-lambda2*t,mu*t,3-6*t]], t=-8..8, mu=-8..8, grid=[100,100]); P1:=plots:-implicitplot3d(9*x^2*(3-z)^2+9*y*(3+z)^4 = 16*(-z^2+9)^2, x=-8..8, y=-3..3, z=-3..3, style=surface, grid=[50,50,50]): P2:=plots:-spacecurve([[t,0,3], [0,t,-3]], t=-8..8, color=red, thickness=3): plots:-display(P1, P2);

Equation of Generatrix : with

Cartesian equation of surface:

## combinat:-permute...

 > restart; with(combinat):
 > permute([a,b],1);
 (1)
 > permute([p\$3,q\$3], 3);
 (2)
 > permute([5\$3,7\$3], 3);
 (3)
 > permute([5\$3,7\$3,9\$3], 2);
 (4)
 > permute([5\$3,7\$3,9\$3], 4);
 (5)
 >

## The result is 2268...

```restart;
with(algcurves):

f:=2*z^6 + z^7/2 - (5*z^11)/4 + 4*z^22 + (29*z^34)/10 - z^40 - (13*z^43)/2 + w^38*(z^2 - z^7/4) +
w^49*(-z^9 + z^13/4 + 2*z^14) + w^34*((7*z^14)/3 - (3*z^18)/2) + w^47*(z^10/3 + (7*z^11)/4 + (8*z^21)/5) +
w^24*(4*z^8 + (4*z^25)/5 - (3*z^27)/2) + w^9*((-6*z^2)/5 - z^6/2 + (7*z^31)/3) +
w^16*((7*z^21)/3 + (4*z^27)/5 + (4*z^32)/3) + w^18*(-6*z^14 - 2*z^31 - z^33) + w^3*(2*z^17 + (7*z^34)/2) +
w^16*((-3*z^5)/4 - 2*z^36 + z^39/3) + w^50*(-1/3*z^23 - (7*z^40)/2 + z^42) + w^4*((-3*z^30)/2 + (4*z^38)/3 + (8*z^42)/5) +
w^33*(-3*z^4 + (8*z^22)/3 - (8*z^43)/5) + w^16*(-1/4*z^26 - (3*z^41)/4 - z^43) + w^48*((2*z^2)/3 + 6*z^26 + (3*z^43)/5) +
w^49*(2*z^18 + z^36 - 2*z^44) + w^10*((-2*z^11)/5 - (3*z^26)/2 + z^45) + w^40*(-1/2*z^20 - z^29 + z^46) +
w^36*(-4 + 8*z^13 - (7*z^47)/4) + w^14*((7*z^24)/5 - 6*z^32 - 6*z^49) + w^22*(-2*z^27 - (8*z^50)/3) +
w^2*((3*z^10)/5 + (7*z^24)/4 - z^50/4);

genus(f,z,w);```

2268

## ListTools:-Collect...

```restart;
L:=[k\$1,y\$23,f\$25];
L0:=sort(ListTools:-Collect(L), key=(t->t[2]));
map(t->t[1], L0);
map(t->t[2], L0);
```

## Check...

Yes, this is indeed an ellipse, most of which is below the Ox axis and it is strongly elongated along this axis. To see it, you need to lengthen the axes and use the scaling=constrained option to correctly show its shape:

`plots:-implicitplot(1/1350000000000000000*x^2-1/14580000000000000000000000000000000*x*y+1/5400000000000000*y^2-1/2250000000*x+173/5400000000*y-1=0, x=-10^10..10^11, y=-3*10^8..3*10^7, gridrefine=3, scaling=constrained, size=[1000,100]);`

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

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