## 15082 Reputation

12 years, 26 days

## MaplePrimes Activity

### These are answers submitted by Kitonum

 > restart; sys_ode := diff(F0(zeta), zeta, zeta)-b^2*F0(zeta)+G0(zeta)^2 = 0, diff(G0(zeta), zeta, zeta)-b^2*G0(zeta) = 0, 2*F0(zeta)+diff(H0(zeta), zeta) = 0; ics := F0(0) = 0, G0(0) = 1, H0(0) = 0, F0(infinity) = 0, G0(infinity) = 0; sol:=dsolve([sys_ode,ics]); sol1:=eval(sol,b=1): plot([eval(F0(zeta),sol1),eval(G0(zeta),sol1),eval(H0(zeta),sol1)], zeta=0..10, color=[red,blue,green]);
 >

## Step by step solution...

Maple has the command  Student:-LinearAlgebra:-LinearSolveTutor  that solves systems of linear equations step by step, but unfortunately only if the matrix of the system is no more than 5 by 5. Below is a step-by-step solution using the Jordan Gauss method using my program  JordanGausse (all comments are in Russian):

system.mw

## Or...

reduce the range along the vertical axis (y-range) while maintaining  x-range. Also use a list rather than a set when specifying functions so that all options match the corresponding function:

```restart;
plot([0, 2*x^2, 2*x^2 - 2*x^3 + 8/3*x^4 - 4*x^5], x = -10 .. 10, y=-1000..1000, color = ["DarkGreen", "CornflowerBlue", "Burgundy"], axes=box);```

## applyrule...

Here is another way by the using the  applyrule  command:

```restart;
expr:=1/exp(z)*arcsinh(x*exp(C[1]))+x*sin(exp(x))+3*exp(C[1]*y)*sqrt(sin(exp(3*h)));
applyrule(exp(t::anything)=Z, expr);
```

## Steiner inellipse...

I think that there are infinitely many ellipses inscribed in a given triangle. But among them there will be only one that touches the sides of the triangle in their midpoints. It is called the Steiner ellipse. See  https://en.wikipedia.org/wiki/Steiner_inellipse

Here is an example of plotting this ellipse:

 > restart; A:=<0,0>: B:=<5,6>: C:=<4,0>: S:=1/3*(A+B+C); AS:=S-A: SC:=C-S: AB:=B-A: XY:=AS+1/2*SC*cos(t)+1/2/sqrt(3)*AB*sin(t); ABC:=plottools:-curve(convert~([A,B,C,A],list), color=blue): P:=plots:-pointplot(convert([(A+B)/2,(B+C)/2,(A+C)/2],list), symbol=solidcircle, color=red, symbolsize=12): plots:-display(plot([XY[1],XY[2],t=0..2*Pi], color=red), ABC, P, scaling=constrained);
 >

## rational function...

For a rational function  f(x)=P(x)/Q(x)  to have a horizontal asymptote  y=y0  and  y0<>0 , it is necessary and sufficient that the polynomials  P(x)  and  Q(x)  have the same degree. In this case, the asymptote will be the same at + infinity and -infinity. Thus, a rational function cannot have two different horizontal asymptotes. Therefore, your conditions may be only partially implemented.

Here is an example:

 > restart; f:=x->0.7*x^2/(x-0.001)/(x+0.001); plot([f(x),0.7,[-0.001,t,t=-1..2],[0.001,t,t=-1..2]], x=-0.005..0.005,-1..2, linestyle=[1,3\$3], color=[red,black\$3], thickness=[2,1\$3], discont, size=[500,500]);
 >

## dsolve(... , numeric), plots:-odeplot...

 > restart; c1:=3.2: c2:=3.3: c3:=3.4: R:=-10: A:=1.6:
 > sol:=dsolve({diff(f(x),x\$4) - c1*diff(g(x),x\$2) + R*(diff(f(x),x)* diff(f(x),x\$2) - f(x)*diff(f(x),x\$3))=0,diff(g(x),x\$2)+c2*(diff(f(x),x\$2)-2*g(x))-c3*(f(x)*diff(g(x),x)-diff(f(x),x)*g(x))=0,D(f)(-1)=0, D(f)(1)=0,f(-1)=1-A,f(1) =1,g(-1)=0,g(1)=0}, numeric);
 (1)
 > plots:-odeplot(sol,[[x,f(x)],[x,g(x)]], x=-1..1, color=[red,blue]);
 >

## simplify, is...

If your goal is to prove the equality of 2 expressions (say A and B) then do  simplify(A - B)  or  is(A = B) :

 > restart;
 > Is_square := M[dmax]*(sigma^2*omega[rK]^2 + omega[r]^2)*L[sigma]/(3*p*omega[r]*omega[rK]*L[mu]^2*sigma^2);
 (1)
 > Is_square2 := M[dmax]*(1 + omega[r]^2/(sigma^2*omega[rK]^2))*L[sigma]/(3*p*omega[r]*L[mu]^2/omega[rK]);
 (2)
 > simplify(%%-%);
 (3)
 >

is(sqrt(x^2)=x) assuming x>=0;

true

## Procedure...

```restart;
P:=proc(n)
local f;
f:=convert(series(exp(x^2),x=7.5,n+1), polynom);
evalf(Int(f, x=5..10));
end proc:

P(100);
evalf(Int(exp(x^2), x=5..10));  # Check
```

1.350882278*10^42
1.350882281*10^42

Addition. I took the expansion not in powers of  x , but in powers of  x-x0  where x0 = 7.5 (this is the middle of the range  5 ..10). If we take the expansion in powers of  x , then to obtain a satisfactory result, it is necessary to take a very large

## rsolve...

 > restart; a:=rsolve({a(n+1)=sqrt(x*a(n)), a(1)=x}, a(n), makeproc);
 (1)
 > L:=[seq(a(n), n=1..10)]; simplify(L) assuming x>=0; simplify(L) assuming x<0;
 (2)
 >

It is obvious that for any x> 0   a(n) = x  for any n , so if x=2 then  a(100)=2 .

## collect...

 > restart;
 > sol:=W(x)=_C1*(cosh(alpha*x)-sinh(alpha*x))+_C2*(cosh(alpha*x)+sinh(alpha*x))+_C3*sin(alpha*x)+_C4*cos(alpha*x); W:=eval(W(x),sol);
 (1)
 > F:=[sinh(alpha*x),cosh(alpha*x),sin(alpha*x),cos(alpha*x)]: W1:=collect(W, F); assign(([D1,D2,D3,D4]=~[coeffs(W1, F)])[]);
 (2)
 > D1, D2, D3, D4;
 (3)
 >

## combinat:-nextperm, combinat:-nextcomb...

The Iterator package was introduced in Maple 2016. If you have an older version of Maple, then you can use the commands  combinat:-nextperm  and  combinat:-nextcomb .

## primpart, content...

```primpart(98-28*sqrt(7), sqrt(7));
content(98-28*sqrt(7), sqrt(7));
%*``(%%);
expand(%);
```

Or manually:

```Expr:=98-28*sqrt(7);
d:=igcd(98,28);
d*``(Expr/d);```

## infinity...

The integral of a periodic function is the same on any period-long interval. The contradiction below is due to limited accuracy in approximate calculation. With increasing accuracy, both methods yield consistent results. Infinity is explained by the fact that the function is discontinuous, its denominator is 0 at some points.

 > restart; x(t) := -3.703703704*10^(-7)*(0.000111668023*cos(1000/33*sqrt(1122)*t) - 0.0001214712007*sin(1000/33*sqrt(1122)*t) - 0.0002325581396*sqrt(561)*sqrt(2)*(-0.0004467462845*sqrt(1122)*sin(1000/33*sqrt(1122)*t) + 0.0004467462845*sqrt(1122)*cos(1000/33*sqrt(1122)*t)))/((2.074226433*10^14*cos(1000/33*sqrt(1122)*t) + 2.074226433*10^14*sin(1000/33*sqrt(1122)*t))*(4.895037587*10^(-11) + 0.01685634229*(0.00001474262739*cos(1000/33*sqrt(1122)*t) + 0.00001474262739*sin(1000/33*sqrt(1122)*t))^2)^2); P:= 33*Pi/1000/sqrt(1122): # Digits=10 RMS:= evalf(sqrt(1/2/P*Int(x(t)^2, t= -P..P))); RMS:= evalf(sqrt(1/2/P*Int(x(t)^2, t= 0..2*P))); Digits:=20: RMS:= evalf(sqrt(1/2/P*Int(x(t)^2, t= -P..P))); RMS:= evalf(sqrt(1/2/P*Int(x(t)^2, t= 0..2*P)));
 (1)
 >

## Plotting surfaces of revolution...

To plot surfaces of revolution it is convenient to use their parametric equations in which to use polar coordinates on the plane. The 1 ex. :

```restart;
x:=r*cos(phi): y:=r*sin(phi):
plot3d([[x,y,r],[x,y,4]], r=0..4, phi=0..2*Pi, style=surface, color=grey, scaling=constrained, labels=["x","y",z]);

```

 1 2 3 4 5 6 7 Last Page 3 of 235
﻿