## add more terms in Taylor series: function with 2 v...

Dear all

How can I add more terms, in taylor approximation of odes.

Attached the code well written for only second order approximatiom, how can i get the fourth order approximation in taylor expansion to approximate an IVP

taylor_fourth_order.mw

thank you

## backspace in mapleflow2022 issue...

Backspacing at the end of a few math containers on one row will shift them upwards beyond the top screen out of view and out of existence.  Your last chance of retrieval is when you can still see the bottom half portions of the letters/equations before you need to go to the first point and press enter to bring them down.  Once they're out of view, there's no chance to bring back what you wrote - the assignments are still valid.  Also note CRTL-Z will not bring them back.

## Can this apparent contradiction be explained?...

This worksheet displays an intersection between two spheres based on a test which seems unrelated to the display.

How can this be explained?

Intersecting_spheres.mw

## Hide command prevents plot from moving in MapleFlo...

Using the hide command after displaying a plot in MapleFlow2022 prevents that plot from being moved.

If you create another plot, then both plots are movable until you use the hide command again, at which point you need to create another plot to allow plots to be positioned.

## arrow procedure...

Hello,

I am writing an arrow procedure and will like to know if there is a way to implement the following

bj := (G, y) ->  (`@`(seq((t -> u -> v -> G(u, t) - v)(args[1 + nargs - i]), i = 1 .. nargs - 2)))(y)
bj(F, y, a, b, c, d);
v:=[p, q, r, s]
the output

My question is, how can I replace the v with each element of the list to get the following as output
F(F(F(F(y,a)-p),b)-q,c)-r,d)-s

Aany suggestion will be highly appreciated

## Why is this worksheet not performing as well in M...

Here is a Maple 2020 worksheet that ran fine on Maple 2020, but runs slower on Maple 2022, especially when plots[display] is used it seems to take much longer?

with(NumberTheory);
with(plots);
NULL;
NULL;
theta := [14.134725, 21.022039, 25.010858, 30.424876, 32.935062, 37.586178, 40.918719, 43.327073, 48.00515, 49.773832, 52.970321, 56.446248, 59.347044, 60.831779, 65.112544, 67.079811, 69.546402, 72.067158, 75.704691, 77.144840, 79.337375, 82.91038, 84.735493, 87.425273, 88.809111, 92.491899, 94.651344, 95.870634, 98.831194];
theta := [14.134725, 21.022039, 25.010858, 30.424876, 32.935062,

37.586178, 40.918719, 43.327073, 48.00515, 49.773832,

52.970321, 56.446248, 59.347044, 60.831779, 65.112544,

67.079811, 69.546402, 72.067158, 75.704691, 77.144840,

79.337375, 82.91038, 84.735493, 87.425273, 88.809111,

92.491899, 94.651344, 95.870634, 98.831194]

y[1] := x -> -2*sqrt(x)*cos(theta[1]*ln(x) - argument(0.5 + theta[1]*I))/(abs(0.5 + theta[1]*I)*ln(x));
y[1] := proc (x) options operator, arrow; -2*sqrt(x)*cos(theta[1\

]*ln(x)-argument(.5+I*theta[1]))/(abs(.5+I*theta[1])*ln(x))

end proc

plot(y[1](x), x = 20 .. 100, title = 'Fig1*(S &G theta) = 1/2 + 14.134725*i');

y[2] := x -> -2*sqrt(x)*cos(theta[2]*ln(x) - argument(0.5 + theta[2]*I))/(abs(0.5 + theta[2]*I)*ln(x));
y[2] := proc (x) options operator, arrow; -2*sqrt(x)*cos(theta[2\

]*ln(x)-argument(.5+I*theta[2]))/(abs(.5+I*theta[2])*ln(x))

end proc

plot(y[2](x), x = 20 .. 100, title = 'Fig1*(S &G theta) = 1/2 + 21.022040*i');

y[3] := x -> -2*sqrt(x)*cos(theta[3]*ln(x) - argument(0.5 + theta[3]*I))/(abs(0.5 + theta[3]*I)*ln(x));
y[3] := proc (x) options operator, arrow; -2*sqrt(x)*cos(theta[3\

]*ln(x)-argument(.5+I*theta[3]))/(abs(.5+I*theta[3])*ln(x))

end proc

plot(y[3](x), x = 20 .. 100, title = 'Fig1*(S &G theta) = 1/2 + 25.00858*i');

y[4] := x -> -2*sqrt(x)*cos(theta[4]*ln(x) - argument(0.5 + theta[4]*I))/(abs(0.5 + theta[4]*I)*ln(x));
y[4] := proc (x) options operator, arrow; -2*sqrt(x)*cos(theta[4\

]*ln(x)-argument(.5+I*theta[4]))/(abs(.5+I*theta[4])*ln(x))

end proc

plot(y[4](x), x = 20 .. 100, title = 'Fig1*(S &G theta) = 1/2 + 30.424876*i');

y[5] := x -> -2*sqrt(x)*cos(theta[5]*ln(x) - argument(0.5 + theta[5]*I))/(abs(0.5 + theta[5]*I)*ln(x));
y[5] := proc (x) options operator, arrow; -2*sqrt(x)*cos(theta[5\

]*ln(x)-argument(.5+I*theta[5]))/(abs(.5+I*theta[5])*ln(x))

end proc

plot(y[5](x), x = 20 .. 100, title = 'Fig1*(S &G theta) = 1/2 + 32.93502*i');

T[1] := x -> -2*sum(Moebius(n)*Re(Ei((0.5 + theta[1]*I)*ln(x)))/n, n = 1 .. trunc(ln(100)/ln(2)) + 1);
T[1] := proc (x) options operator, arrow; -2*(sum(NumberTheory:-\

Moebius(n)*Re(Ei((.5+I*theta[1])*ln(x)))/n, n = 1 ..

trunc(ln(100)/ln(2))+1)) end proc

plot(T[1](x), x = 20 .. 100, title = 'T[1]');

T[2] := x -> -2*sum(Moebius(n)*Re(Ei((0.5 + theta[2]*I)*ln(x)))/n, n = 1 .. trunc(ln(100)/ln(2)) + 1);
T[2] := proc (x) options operator, arrow; -2*(sum(NumberTheory:-\

Moebius(n)*Re(Ei((.5+I*theta[2])*ln(x)))/n, n = 1 ..

trunc(ln(100)/ln(2))+1)) end proc

plot(T[2](x), x = 20 .. 100, title = 'T[2]');

T[3] := x -> -2*sum(Moebius(n)*Re(Ei((0.5 + theta[3]*I)*ln(x)))/n, n = 1 .. trunc(ln(100)/ln(2)) + 1);
T[3] := proc (x) options operator, arrow; -2*(sum(NumberTheory:-\

Moebius(n)*Re(Ei((.5+I*theta[3])*ln(x)))/n, n = 1 ..

trunc(ln(100)/ln(2))+1)) end proc

plot(T[3](x), x = 20 .. 100, title = 'T[3]');

T[4] := x -> -2*sum(Moebius(n)*Re(Ei((0.5 + theta[3]*I)*ln(x)))/n, n = 1 .. trunc(ln(100)/ln(2)) + 1);
T[4] := proc (x) options operator, arrow; -2*(sum(NumberTheory:-\

Moebius(n)*Re(Ei((.5+I*theta[3])*ln(x)))/n, n = 1 ..

trunc(ln(100)/ln(2))+1)) end proc

plot(T[4](x), x = 20 .. 100, title = 'T[4]');

T[5] := x -> -2*sum(Moebius(n)*Re(Ei((0.5 + theta[5]*I)*ln(x)))/n, n = 1 .. trunc(ln(100)/ln(2)) + 1);
T[5] := proc (x) options operator, arrow; -2*(sum(NumberTheory:-\

Moebius(n)*Re(Ei((.5+I*theta[5])*ln(x)))/n, n = 1 ..

trunc(ln(100)/ln(2))+1)) end proc

plot(T[5](x), x = 20 .. 100, title = 'T[5]');

f10 := x -> Li(x) - 2*sum(Re(Ei((1/2 + theta[n]*I)*ln(x))), n = 1 .. 10) - ln(2) + int(1/(t*(t^2 - 1)*ln(t)), t = x .. infinity);
f10 := proc (x) options operator, arrow; Li(x)-2*(sum(Re(Ei((1/2\

+I*theta[n])*ln(x))), n = 1 .. 10))-ln(2)+int(1/(t*(t^2-1)*ln(\

t)), t = x .. infinity) end proc

R10 := x -> sum(Moebius(l)*f10(x^(1/l))/l, l = 1 .. 8);
R10 := proc (x) options operator, arrow; sum(NumberTheory:-Moebi\

us(l)*f10(x^(1/l))/l, l = 1 .. 8) end proc

plot1 := plot(R10(x), x = 2 .. 100);

plot2 := plot(pi(x), x = 2 .. 100);

display([plot1, plot2]);

f29 := x -> Li(x) - 2*sum(Re(Ei((1/2 + theta[n]*I)*ln(x))), n = 1 .. 29) - ln(2) + int(1/(t*(t^2 - 1)*ln(t)), t = x .. infinity);
f29 := proc (x) options operator, arrow; Li(x)-2*(sum(Re(Ei((1/2\

+I*theta[n])*ln(x))), n = 1 .. 29))-ln(2)+int(1/(t*(t^2-1)*ln(\

t)), t = x .. infinity) end proc

R29 := x -> sum(Moebius(l)*f29(x^(1/l))/l, l = 1 .. 8);
R29 := proc (x) options operator, arrow; sum(NumberTheory:-Moebi\

us(l)*f29(x^(1/l))/l, l = 1 .. 8) end proc

plot3 := plot(R29(x), x = 2 .. 100);

NULL;
display([plot1, plot2, plot3]);

R29(100);
R10(100);
pi(100);
25.25165721

25.28503922

25

RR10 := x -> sum(Moebius(l)*f10(x^(1/l))/l, l = 1 .. trunc(ln(1000)/ln(2)) + 1);
RR10 := proc (x) options operator, arrow; sum(NumberTheory:-Moeb\

ius(l)*f10(x^(1/l))/l, l = 1 .. trunc(ln(1000)/ln(2))+1) end

proc

RR10(1000);
pi(1000);
168.1328341

168

RR29 := x -> sum(Moebius(l)*f29(x^(1/l))/l, l = 1 .. trunc(ln(1000)/ln(2)) + 1);
RR29 := proc (x) options operator, arrow; sum(NumberTheory:-Moeb\

ius(l)*f29(x^(1/l))/l, l = 1 .. trunc(ln(1000)/ln(2))+1) end

proc

RR29(1000);
167.6113955

P1 := plot(RR29(x), x = 880 .. 930);

P2 := plot(pi(x), x = 880 .. 930);

display([P1, P2]);

f0 := x -> Li(x) - ln(2) + int(1/(t*(t^2 + 1)*ln(t)), t = x .. infinity);
f0 := proc (x) options operator, arrow; Li(x)-ln(2)+int(1/(t*(t^\

2+1)*ln(t)), t = x .. infinity) end proc

RR0 := x -> sum(Moebius(l)*f0(x^(1/l))/l, l = 1 .. trunc(ln(1000)/ln(2)) + 1);
RR0 := proc (x) options operator, arrow; sum(NumberTheory:-Moebi\

us(l)*f0(x^(1/l))/l, l = 1 .. trunc(ln(1000)/ln(2))+1) end proc

P3 := plot(RR0(x), x = 880 .. 930);

NULL;
display([P1, P2, P3]);

P4 := plot(RR10(x), x = 880 .. 930);

display([P1, P2, P3, P4], color = [green, blue, purple, yellow]);

evalf(Li(2)), evalf(ln(2));
1.045163780, 0.6931471806

evalf(li(2));
li(2)

evalf(Ei(2));
4.954234356

evalf(Int(1/ln(t), t = 0 .. 2));
Float(undefined)

evalf(Ei(ln(2)));
1.045163780

Li(1000.);
177.6096580

isprime, [\$ (1 .. 100)];
isprime, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,

17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,

33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,

49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,

65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,

81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,

97, 98, 99, 100]

nops(select(isprime, [\$ (1 .. 100)]));
25

theta[1];
14.134725

evalf(Ei((1/2 + theta[1]*I)*ln(x)));
Ei((0.5000000000 + 14.134725 I) ln(x))

evalf(Ei(ln(1/2 + theta[1]*I)));
4.386989035 + 6.632175089 I

plot(Li(x), x = 0 .. 5);

## Maple Matrix Question...

Let
"a"

and
"b"

be real numbers and

"A = Matrix(3, 3, [[a, a - 1, -b], [a - 1, a, -b], [b, b, 2*a -

1]])"

,
"B="

"Matrix(5, 5, [[0, a, 3, 0, a], [3, 0, 0, b, 0], [0, 1, b, 0,

1], [b, 0, 0, 1, 0], [0, a, 1, 0, b]])"

(a) Show that if
"0 <= a"

"a <= 1"

and
"b^2 = 2*a*(1 - a)"

, then A is an orthogonal matrix with determinant equal to one.
(b) For what values of a and b is the matrix B singular? Determine the inverse of B (for those values of a and b for which B is invertible).

## Find all rational function solutions to the Kadomt...

Find all rational function solutions to the Kadomtsev-Petviashvili equation

(&PartialD;)/(&PartialD;x);

diff(u, t) + 6*u*diff(u, x) + diff(u, x, x, x) - diff(u, y, y) = 0;

by u = 2
diff(ln, x, x)*f;

=(2 (((&PartialD;)^2)/(&PartialD;x^2) f) f-2 ((&PartialD;)/(&PartialD;x) f)^2)/(f^2);
with
f;
=
(a[1 ]x+a[2] y+a[3] t+a[4])^2+(a[5] x+ a[6] y+a[7] t+a[8])^2+a[9], ;
where
a[i], i=1..9, ;
are real constants.

## "How to find the values of this series? "...

How to find the values of X(1),X(2),..&Y(1),Y(2)...Plese help .
 > restart;
 for k from 0 to 5 do X(k+1):=solve(2*(k+1)*X(k+1)+(k+1)*Y(k+1)-X(k)-Y(k)+(1)/k!,X(k+1)); Y(k+1):=solve((k+1)*X(k+1)+(k+1)*Y(k+1)+2*X(k)+Y(k)+(1)/k!,Y(k+1)); od;
 >
 >

## How to simplify an expression witrh séries ?...

The serie is :

How to simplify (with collect ? with convert ?...) this expression to get this more "traditionnal" writing :

## problems with odetest applied to series solution w...

To Maple support:

I see 2 problems here. Maple solves the ode using series method.

First problem: Using odetest shows the syntax according to help does not work. Which is

odetest(sol, ODE, series, point = 0);

The above gives internal error.

When changing to the following syntax

odetest(sol,ODE,type='series',point=0);

No internal error.

So help page should be corrected.

The second problem is that Maple odetest does not return 0 on its own solution. I verified manually that the solution is correct actually. So I do not know why maple does not return zero here. Simplfication does not help.

 > interface(version);

 > restart;
 > Order:=6; ode:=x^2*diff(diff(y(x),x),x)+x^2*diff(y(x),x)+y(x) = 0; maple_sol:=dsolve(ode,y(x),type='series',x=0): odetest(maple_sol,ode,series,point=0); odetest(maple_sol,ode,'series',point=0);

Error, (in odetest/series) complex argument to max/min: 13/2-1/2*I*3^(1/2)

Error, (in odetest/series) complex argument to max/min: 13/2-1/2*I*3^(1/2)

 > odetest(maple_sol,ode,type='series',point=0); #This should return zero, but it does not.

 >

## How to return or get a list-variable back from a f...

I want to use this L3 list as the index of another list. I am trying to create a model for short time electricity load forecasting in Maple. I am fairly new to maple coding structures. Can anybody suggest an easier way for doing this kind of thing in Maple? Can I use matrix generation? Please give me suggestions.
Note: Currently working in a Doc File.
The code is pasted below:

```L1 := [seq([seq(seq1[i], i = 1 .. 7)], i = 1 .. 24)];

L2 := [seq(i, i = 1 .. 24)];

local(i, j, L3);
L3 = [];
for i to 24 do
for j to 7 do if i = 1 then L3[i][j] := L1[i][j]; else L3[i][j] := L1[i][j] + L2[i] - 1; end if; end do;
end do;
print(L3);
```

## How to find area of the region bounded by the give...

How can I found the area of the region bounded by

y=e^xcos(x), y=o, x=−π/2, x= π/2 ?

## doublefactorial weirdness...

I have an example where I try to calculate an infinite sum (G&R1.641.1)  in Maple 2022 (or 2021).  I get a different numerical result when I evaluate the sum if I express the coefficients c(m) in the sum using Maple's doublefactorial function for m!! (c1(m)) or the equivalent expression involving the factorial function (c2(m)).  Only the latter gives the correct value for the sum.  This happens even though Maple gives the same numerical value for the coefficients c1(m) and c2(m).  What's going on?? Please see the attached spreadsheet.