MaplePrimes Questions

I have a surface defined by C(x, y, x) = 0 that I visualize with implicitplot3d.
Using shading=shue does not suits me and I would like to define my own coloring function F(x, y, z).

The first error I got made me think that a coloring function cannot depend on 3 parameters.
But a simpler (and not visually satysfying function) F(x, y) already leads to an error, which makes me wonder if it is possible to use a colorig function with  implicitplot3d?

implicitplot3d_coloring.mw

Thanks in advance

restart;
_local(D, O);
with(Student:-MultivariateCalculus);
A := [0, 0, 0];
B := [a, 0, 0];
C := [a, b, 0];
D := [0, b, 0];
S := [0, 0, h];
O := [x, y, z];
lineSC := Line(S, C);
lineSD := Line(S, D);
H := Projection(A, lineSC);
K := Projection(A, lineSD);
OH := H - O;
OK := K - O;
OC := C - O;
M := Matrix([OH, OK, OC]);
O := eval(O, %);
R := simplify(Distance(O, H));
                               O

Student:-MultivariateCalculus:-LineApplyFunction([0,0,h],

  [Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(a, 

  rowalign = "", columnalign = "", groupalign = "", 

  rowspan = "1", columnspan = "1"), rowalign = "", 

  columnalign = "", groupalign = ""), Typesetting:-mtr(

  Typesetting:-mtd(b, rowalign = "", columnalign = "", 

  groupalign = "", rowspan = "1", columnspan = "1"), 

  rowalign = "", columnalign = "", groupalign = ""), 

  Typesetting:-mtr(Typesetting:-mtd(uminus0h, rowalign = "", 

  columnalign = "", groupalign = "", rowspan = "1", 

  columnspan = "1"), rowalign = "", columnalign = "", 

  groupalign = ""), foreground = "[0,0,0]", readonly = "false", 

  align = "axis", rowalign = "baseline", columnalign = "center", 

  groupalign = "{left}", alignmentscope = "true", 

  columnwidth = "auto", width = "auto", rowspacing = "1.0ex", 

  columnspacing = "0.8em", rowlines = "none", 

  columnlines = "none", frame = "none", 

  framespacing = "0.4em 0.5ex", equalrows = "false", 

  equalcolumns = "false", displaystyle = "false", side = "right", 

  minlabelspacing = "0.8em")],variables=[x,y,z],parameter=t,id=1)


Student:-MultivariateCalculus:-LineApplyFunction([0,0,h],

  [Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(0, 

  rowalign = "", columnalign = "", groupalign = "", 

  rowspan = "1", columnspan = "1"), rowalign = "", 

  columnalign = "", groupalign = ""), Typesetting:-mtr(

  Typesetting:-mtd(b, rowalign = "", columnalign = "", 

  groupalign = "", rowspan = "1", columnspan = "1"), 

  rowalign = "", columnalign = "", groupalign = ""), 

  Typesetting:-mtr(Typesetting:-mtd(uminus0h, rowalign = "", 

  columnalign = "", groupalign = "", rowspan = "1", 

  columnspan = "1"), rowalign = "", columnalign = "", 

  groupalign = ""), foreground = "[0,0,0]", readonly = "false", 

  align = "axis", rowalign = "baseline", columnalign = "center", 

  groupalign = "{left}", alignmentscope = "true", 

  columnwidth = "auto", width = "auto", rowspacing = "1.0ex", 

  columnspacing = "0.8em", rowlines = "none", 

  columnlines = "none", frame = "none", 

  framespacing = "0.4em 0.5ex", equalrows = "false", 

  equalcolumns = "false", displaystyle = "false", side = "right", 

  minlabelspacing = "0.8em")],variables=[x,y,z],parameter=t,id=2)


               /     2            2         / 2    2\ /
               |    h  a         h  b     h \a  + b / |
        HAssign|------------,------------,------------|
               | 2    2    2  2    2    2  2    2    2|
               \a  + b  + h  a  + b  + h  a  + b  + h \

                          /    2         2  /
                          |   h  b    h b   |
                   KAssign|0,-------,-------|
                          |   2    2  2    2|
                          \  b  + h  b  + h \

        /                2                       2               
        |               h  a                    h  b             
OHAssign|uminus0x + ------------,uminus0y + ------------,uminus0z
        |            2    2    2             2    2    2         
        \           a  + b  + h             a  + b  + h          

       / 2    2\ /
     h \a  + b / |
   + ------------|
      2    2    2|
     a  + b  + h \


            /                      2                    2  /
            |                     h  b               h b   |
    OKAssign|uminus0x,uminus0y + -------,uminus0z + -------|
            |                     2    2             2    2|
            \                    b  + h             b  + h \

          OCAssign(uminus0x + a,uminus0y + b,uminus0z)

M := Matrix(3, 3, {(1, 1) = Typesetting:-mrow(Typesetting:-mo("&\

  uminus0;"), Typesetting:-mi("x"), Typesetting:-mo("+"), 

   Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-msup(Typese\

  tting:-mi("h"), Typesetting:-mn("2")), Typesetting:-mo("&Invis\

  ibleTimes;"), Typesetting:-mi("a")), Typesetting:-mrow(Typeset\

  ting:-msup(Typesetting:-mi("a"), Typesetting:-mn("2")), 

   Typesetting:-mo("+"), Typesetting:-msup(Typesetting:-mi(\

  "b"), Typesetting:-mn("2")), Typesetting:-mo("+"), 

   Typesetting:-msup(Typesetting:-mi("h"), Typesetting:-mn("2"))\

  ))), (1, 2) = Typesetting:-mrow(Typesetting:-mo("&uminus0;"), 

   Typesetting:-mi("y"), Typesetting:-mo("+"), Typesetting:\

  -mfrac(Typesetting:-mrow(Typesetting:-msup(Typesetting:-mi("h"\

  ), Typesetting:-mn("2")), Typesetting:-mo("⁢"),\

   Typesetting:-mi("b")), Typesetting:-mrow(Typesetting:-msup(Ty\

  pesetting:-mi("a"), Typesetting:-mn("2")), Typesetting:-mo("&p\

  lus;"), Typesetting:-msup(Typesetting:-mi("b"), Typesetting:-m\

  n("2")), Typesetting:-mo("+"), Typesetting:-msup(Typesett\

  ing:-mi("h"), Typesetting:-mn("2"))))), (1, 3) = Typesetting:-\

  mrow(Typesetting:-mo("&uminus0;"), Typesetting:-mi("z"), 

   Typesetting:-mo("+"), Typesetting:-mfrac(Typesetting:-mr\

  ow(Typesetting:-mi("h"), Typesetting:-mo("⁢"), 

   Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-msup(Type\

  setting:-mi("a"), Typesetting:-mn("2")), Typesetting:-mo("&plu\

  s;"), Typesetting:-msup(Typesetting:-mi("b"), Typesetting:-mn(\

  "2"))))), Typesetting:-mrow(Typesetting:-msup(Typesetting:-mi(\

  "a"), Typesetting:-mn("2")), Typesetting:-mo("+"), 

   Typesetting:-msup(Typesetting:-mi("b"), Typesetting:-mn("2"))\

  , Typesetting:-mo("+"), Typesetting:-msup(Typesetting:-mi\

  ("h"), Typesetting:-mn("2"))))), (2, 1) = Typesetting:-mrow(Ty\

  pesetting:-mo("&uminus0;"), Typesetting:-mi("x")), (2, 2) = 

   Typesetting:-mrow(Typesetting:-mo("&uminus0;"), Typesetting:-\

  mi("y"), Typesetting:-mo("+"), Typesetting:-mfrac(Typeset\

  ting:-mrow(Typesetting:-msup(Typesetting:-mi("h"), 

   Typesetting:-mn("2")), Typesetting:-mo("⁢"), 

   Typesetting:-mi("b")), Typesetting:-mrow(Typesetting:-msup(Ty\

  pesetting:-mi("b"), Typesetting:-mn("2")), Typesetting:-mo("&p\

  lus;"), Typesetting:-msup(Typesetting:-mi("h"), Typesetting:-m\

  n("2"))))), (2, 3) = Typesetting:-mrow(Typesetting:-mo("&uminu\

  s0;"), Typesetting:-mi("z"), Typesetting:-mo("+"), 

   Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mi("h"), 

   Typesetting:-mo("⁢"), Typesetting:-msup(Typese\

  tting:-mi("b"), Typesetting:-mn("2"))), Typesetting:-mrow(Type\

  setting:-msup(Typesetting:-mi("b"), Typesetting:-mn("2")), 

   Typesetting:-mo("+"), Typesetting:-msup(Typesetting:-mi(\

  "h"), Typesetting:-mn("2"))))), (3, 1) = Typesetting:-mrow(Typ\

  esetting:-mo("&uminus0;"), Typesetting:-mi("x"), Typesetting:-\

  mo("+"), Typesetting:-mi("a")), (3, 2) = Typesetting:-mro\

  w(Typesetting:-mo("&uminus0;"), Typesetting:-mi("y"), 

   Typesetting:-mo("+"), Typesetting:-mi("b")), (3, 3) = 

   Typesetting:-mrow(Typesetting:-mo("&uminus0;"), Typesetting:-\

  mi("z"))})


Error, invalid input: eval received Matrix(3, 3, {(1, 1) = -x+h^2*a/(a^2+b^2+h^2), (1, 2) = -y+h^2*b/(a^2+b^2+h^2), (1, 3) = -z+h*(a^2+b^2)/(a^2+b^2+h^2), (2, 1) = -x, (2, 2) = -y+h^2*b/(b^2+h^2), (2, 3) = -z+h*b^2/(b^2+h^2), (3, 1) = -x+a, (3, 2) = -y+b, (3, 3) = -z}), which is not valid for its 2nd argument, eqns
       /     1       / 2  2      2        2  2    2  2    2  2
  R := |------------ \a  h  - 2 a  h z + a  x  + a  y  + a  z 
       | 2    2    2                                          
       \a  + b  + h                                           

            2      2  2      2        2  2    2  2    2  2
     - 2 a h  x + b  h  - 2 b  h z + b  x  + b  y  + b  z 

            2      2  2    2  2    2  2\\      
     - 2 b h  y + h  x  + h  y  + h  z /|^(1/2)
                                        |      
                                        /      
Why this error ? Thank you.

I have a problem with the order  of the Eigenvalues and Vectors flipping. It is a bit random. I only found it trying to understand why a procedure sometimes rotated a conic one way and  then the other. This a really causing a quite a problem, I have only tried this in Maple 2024 so far. I have included screen shots to prove the effect.

restart

 

with(LinearAlgebra):

 

M:=Matrix([[0,1],[1,0]]);

a,b:=Eigenvectors(M)  ;#click here and press enter again possible a 4 times, output can filp

 

Matrix(2, 2, {(1, 1) = 0, (1, 2) = 1, (2, 1) = 1, (2, 2) = 0})

 

Vector[column](%id = 36893491125752073860), Matrix(%id = 36893491125752073980)

(1)

a

Vector(2, {(1) = 1, (2) = -1})

(2)

b

Matrix(2, 2, {(1, 1) = 1, (1, 2) = -1, (2, 1) = 1, (2, 2) = 1})

(3)

 

 

Download 2024-03-21_Q_Eigenvector_output_flipping.mw

Hi I have an n×4 matrix of answer data to a questionnaire I would like to convert into a pivot table. So I can do a Chi2test. 

 

How do I construct said table? 

I have a complicated tensor expression that is defined wtih all indices down. However if i consider a one-up-one-down configuration it appears to introduce new terms that no longer produce the same result as the all down configuration. Not sure what to make of this. 

IndexQuestion.mw

Hi, I am looking to color the area between the square and the circle (similar to the shadebetween command) and, in general, to color the area between two geometric shapes. Any suggestions? Thank you.

Couronne.mw

Just wonder if someone has any hints about correct code debugging.

Especially I'd like to know how often certain subroutines are called, and where from.

Dear Maple community,

I am facing a little problem verifying a power series solution obtained with Maple since the direct substitution back into the PDEs does not seem to be conclusive because the residual contains the powers of independent variables to almost any order.

Please see the enclosed Maple file with a minimal working example:

restart:

with(DETools):

PDE1 := diff(eta(t,x),t) + 1/2*diff(u(t,x),x) + 1/2*eta(t,x)*diff(u(t,x),x) - 1/48*diff(u(t,x),x$3) + diff(eta(t,x),x)*u(t,x);

diff(eta(t, x), t)+(1/2)*(diff(u(t, x), x))+(1/2)*eta(t, x)*(diff(u(t, x), x))-(1/48)*(diff(diff(diff(u(t, x), x), x), x))+(diff(eta(t, x), x))*u(t, x)

(1)

PDE2 := diff(u(t,x),t) + u(t,x)*diff(u(t,x),x) + diff(eta(t,x),x,t,t) + diff(eta(t,x),x) - 1/6*diff(u(t,x),x,x,t);

diff(u(t, x), t)+u(t, x)*(diff(u(t, x), x))+diff(diff(diff(eta(t, x), t), t), x)+diff(eta(t, x), x)-(1/6)*(diff(diff(diff(u(t, x), t), x), x))

(2)

sys := rifsimp([PDE1, PDE2]);

table( [( Solved ) = [diff(diff(diff(eta(t, x), t), t), x) = -u(t, x)*(diff(u(t, x), x))-(diff(u(t, x), t))+(1/6)*(diff(diff(diff(u(t, x), t), x), x))-(diff(eta(t, x), x)), diff(diff(diff(u(t, x), x), x), x) = 24*eta(t, x)*(diff(u(t, x), x))+48*(diff(eta(t, x), x))*u(t, x)+48*(diff(eta(t, x), t))+24*(diff(u(t, x), x))] ] )

(3)

id := initialdata(sys[Solved]);

table( [( Finite ) = [], ( Infinite ) = [eta(t, x[0]) = _F1(t), (D[2](eta))(t[0], x) = _F2(x), (D[1, 2](eta))(t[0], x) = _F3(x), u(t, x[0]) = _F4(t), (D[2](u))(t, x[0]) = _F5(t), (D[2, 2](u))(t, x[0]) = _F6(t)] ] )

(4)

sols := rtaylor(sys[Solved], id, point=[t = 0, x = 0], order = 3);

[eta(t, x) = _F1(0)+(D(_F1))(0)*t+_F2(0)*x+(1/2)*((D@@2)(_F1))(0)*t^2+_F3(0)*t*x+(1/2)*(D(_F2))(0)*x^2+(1/6)*((D@@3)(_F1))(0)*t^3+(1/2)*(-_F4(0)*_F5(0)-(D(_F4))(0)+(1/6)*(D(_F6))(0)-_F2(0))*t^2*x+(1/2)*(D(_F3))(0)*t*x^2+(1/6)*((D@@2)(_F2))(0)*x^3, u(t, x) = _F4(0)+(D(_F4))(0)*t+_F5(0)*x+(1/2)*((D@@2)(_F4))(0)*t^2+(D(_F5))(0)*t*x+(1/2)*_F6(0)*x^2+(1/6)*((D@@3)(_F4))(0)*t^3+(1/2)*((D@@2)(_F5))(0)*t^2*x+(1/2)*(D(_F6))(0)*t*x^2+(1/6)*(24*_F1(0)*_F5(0)+48*_F2(0)*_F4(0)+48*(D(_F1))(0)+24*_F5(0))*x^3]

(5)

assign(sols);

simplify(PDE1);

((D@@2)(_F1))(0)*t+_F3(0)*x+(1/2)*((D@@3)(_F1))(0)*t^2-t*(_F4(0)*_F5(0)+_F2(0)+(D(_F4))(0)-(1/6)*(D(_F6))(0))*x+(1/2)*(D(_F3))(0)*x^2+(1/2)*(D(_F5))(0)*t+(1/2)*_F6(0)*x+(1/4)*((D@@2)(_F5))(0)*t^2+(1/2)*(D(_F6))(0)*t*x+6*((_F1(0)+1)*_F5(0)+2*_F2(0)*_F4(0)+2*(D(_F1))(0))*x^2+(1/2)*(_F1(0)+(D(_F1))(0)*t+_F2(0)*x+(1/2)*((D@@2)(_F1))(0)*t^2+_F3(0)*t*x+(1/2)*(D(_F2))(0)*x^2+(1/6)*((D@@3)(_F1))(0)*t^3+(1/2)*(-_F4(0)*_F5(0)-(D(_F4))(0)+(1/6)*(D(_F6))(0)-_F2(0))*t^2*x+(1/2)*(D(_F3))(0)*t*x^2+(1/6)*((D@@2)(_F2))(0)*x^3)*(_F5(0)+(D(_F5))(0)*t+_F6(0)*x+(1/2)*((D@@2)(_F5))(0)*t^2+(D(_F6))(0)*t*x+(1/2)*(24*_F1(0)*_F5(0)+48*_F2(0)*_F4(0)+48*(D(_F1))(0)+24*_F5(0))*x^2)-(1/2)*_F1(0)*_F5(0)-_F2(0)*_F4(0)+(_F2(0)+_F3(0)*t+(D(_F2))(0)*x+(1/2)*(-_F4(0)*_F5(0)-(D(_F4))(0)+(1/6)*(D(_F6))(0)-_F2(0))*t^2+(D(_F3))(0)*t*x+(1/2)*((D@@2)(_F2))(0)*x^2)*(_F4(0)+(D(_F4))(0)*t+_F5(0)*x+(1/2)*((D@@2)(_F4))(0)*t^2+(D(_F5))(0)*t*x+(1/2)*_F6(0)*x^2+(1/6)*((D@@3)(_F4))(0)*t^3+(1/2)*((D@@2)(_F5))(0)*t^2*x+(1/2)*(D(_F6))(0)*t*x^2+(1/6)*(24*_F1(0)*_F5(0)+48*_F2(0)*_F4(0)+48*(D(_F1))(0)+24*_F5(0))*x^3)

(6)

simplify(PDE2);

((D@@2)(_F4))(0)*t+(D(_F5))(0)*x+(1/2)*((D@@3)(_F4))(0)*t^2+((D@@2)(_F5))(0)*t*x+(1/2)*(D(_F6))(0)*x^2+(_F4(0)+(D(_F4))(0)*t+_F5(0)*x+(1/2)*((D@@2)(_F4))(0)*t^2+(D(_F5))(0)*t*x+(1/2)*_F6(0)*x^2+(1/6)*((D@@3)(_F4))(0)*t^3+(1/2)*((D@@2)(_F5))(0)*t^2*x+(1/2)*(D(_F6))(0)*t*x^2+(1/6)*(24*_F1(0)*_F5(0)+48*_F2(0)*_F4(0)+48*(D(_F1))(0)+24*_F5(0))*x^3)*(_F5(0)+(D(_F5))(0)*t+_F6(0)*x+(1/2)*((D@@2)(_F5))(0)*t^2+(D(_F6))(0)*t*x+(1/2)*(24*_F1(0)*_F5(0)+48*_F2(0)*_F4(0)+48*(D(_F1))(0)+24*_F5(0))*x^2)-_F4(0)*_F5(0)+_F3(0)*t+(D(_F2))(0)*x-(1/2)*t^2*(_F4(0)*_F5(0)+_F2(0)+(D(_F4))(0)-(1/6)*(D(_F6))(0))+(D(_F3))(0)*t*x+(1/2)*((D@@2)(_F2))(0)*x^2

(7)

NULL

Download MinWorkingExa.mw

Thanks a lot in advance for any help or suggestions.

Kind regards,

DDe

Suppose I have an expression like the following:

h(t, x) :=  (m*t^2 + 6*t - 2*x)^2/(36*g*t^2)

I want to calculate multiple values of t in a single expression. Say, for t:= 1,5,10,15,20. I want to evaluate h(t,x) in vector form. so that I can extract for each t. How to write it?

 

I do not know if this caused by same crash in Reproducible--Server-Crash-Kernel-Connection-Has-Been-Lost  or not.

Could someone be able to find out? It happens each time the code is run on windows 10. 

 

26028

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1715 and is the same as the version installed in this computer, created 2024, April 3, 20:27 hours Pacific Time.`

restart;

10168

u:=Int(2/3/alpha^(3/2)*sin(1/2*3^(1/2)*ln(alpha))*sin(alpha)*3^(1/2),alpha = 0 .. x)

Int((2/3)*sin((1/2)*3^(1/2)*ln(alpha))*sin(alpha)*3^(1/2)/alpha^(3/2), alpha = 0 .. x)

value(u);


Download another_server_crash_on_int_maple_2024_april_4_2024.mw

ps. reported to Maplesoft.

The above is new crash in Maple 2024. Below shows no crash in Maple 2023:

26028

interface(version);

`Standard Worksheet Interface, Maple 2023.2, Windows 10, November 24 2023 Build ID 1762575`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1715. The version installed in this computer is 1672 created 2024, February 7, 18:34 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2023\Physics Updates\lib\`

restart;

23104

u:=Int(2/3/alpha^(3/2)*sin(1/2*3^(1/2)*ln(alpha))*sin(alpha)*3^(1/2),alpha = 0 .. x)

Int((2/3)*sin((1/2)*3^(1/2)*ln(alpha))*sin(alpha)*3^(1/2)/alpha^(3/2), alpha = 0 .. x)

value(u);

int((2/3)*sin((1/2)*3^(1/2)*ln(alpha))*sin(alpha)*3^(1/2)/alpha^(3/2), alpha = 0 .. x)

 

 

Download int_on_maple_2023.mw

Update:

Here is a movie showing the crash. It also happens from the command line. All on windows 10.

My ini file has  nothing in it, other than one command which prints the process ID which I had there for over a year now.  This is after restarting Maple fresh and nothing else running other than this one worksheet.

 

Here is movie showing the crash from command line also. On windows 10 pro.

 

 

Absolute beginner here - please bear with me.

I would like to generate an 81 rows x 24 columns table from three nested "for" loops. I would like each entry of this table to be a list of 4 numbers. My code (which does not work) is as follows:

local M, templist;
for i to 81 do
    for j to 24 do
        for k to 4 do
        M[i][j]:=[op(templist[k]), indice(C[i][1][k],rorder(orders[j],Sets[k]));];
        end do;
    end do;
end do;

In the above "indice" is a procedure that works fine and returns a number, and it works fine.

I would like the 4 numbers that are generated by the k loop to be stringed together into a list, so i thought I could use the temporary list "templist" to append to it the 4 numbers, which would then become the entry in row i and column j of matrix M, but it does not work, and instead I get a table of 81 tables. So for instance the first of these 81 tables is:

1 = table([1 = [4, 1], 2 = [4, 1], 3 = [4, 2], 4 = [4, 3], 5 = [4, 2], 6 = [4, 3], 7 = [4, 1], 9 = [4, 1], 8 = [4, 1], 11 = [4, 1], 10 = [4, 1], 13 = [4, 2], 12 = [4, 1], 15 = [4, 2], 14 = [4, 3], 18 = [4, 3], 19 = [4, 2], 16 = [4, 2], 17 = [4, 3], 22 = [4, 2], 23 = [4, 3], 20 = [4, 3], 21 = [4, 2], 24 = [4, 3]])

and I only have 2 values in each list, rather then the 4 I am after.

If I declare M as a 81x24 matrix, I get retunred a matrix of zeroes. Where am I going wrong?

If anyone could lend a hand, I'd be forever grateful. Thank you!

I just discoverd today the step solutions for series in Student package 

Now i try to solve this with my own steps here ..

Note: SummationSteps(Sum(1/n^2, n = 1 .. infinity))was not capable to get a closed form?

"maple.ini in users"

(1)

NULL

Euler's Basel Problem
In the Student Basics package, there is a command :

 

SummationSteps

generate steps for evaluating summations

NULL

help("SummationSteps")

The SummationSteps command accepts an expression that is expected to contain summations and displays the steps required to evaluate each summation given.

2024

with(Student[Basics])

 

" restart; with(Student[Basics])"

"maple.ini in users"

 

[CompleteSquareSteps, CurveSketchSteps, ExpandSteps, FactorSteps, FractionSteps, GCDSteps, LCMSteps, LinearSolveSteps, LongDivision, ModuloSteps, OutputStepsRecord, PartialFractionSteps, PowerSteps, PracticeSheet, SimplifySteps, SolveSteps, SummationSteps, TrigSteps]

(2)

Try this out this SummationStepscommand for the Basel problem series  ( p-series example)

SummationSteps(Sum(1/n, n = 1 .. infinity))

"[[,,[]],["&bullet;",,"Apply the P-test on" (1)/(n)", which shows the summation diverges if" p<=1 "for" (&sum;)1/((n)^p)],[,,p=1],["&bullet;",,"Since" 0<1 "and" 1<=1", we get that the summation diverges"],[,,([[(&sum;)(1)/(n)" diverges"]])],["&bullet;",,"We know the summation diverges, so now we should find what it diverges to"],[,,[]],["&bullet;",,"Evaluate sum" (&sum;)1/n],[,,infinity]]"

(3)

Now the Basel Problem from Euler

SummationSteps(Sum(1/n^2, n = 1 .. infinity))

"[[,,[]],["&bullet;",,"Apply the P-test on" (n)^(-2)", which shows the summation diverges if" p<=1 "for" (&sum;)1/((n)^p)],[,,p=2],["&bullet;",,"Since" 1<2", we get that the summation converges"],[,,([[(&sum;)(n)^(-2)" converges"]])]]"

(4)

f := sum(1/n^2, n = 1 .. infinity)

(1/6)*Pi^2

(5)

How do we get this value from Euler ( The Basel Problem)

# Step 1: Define the series f
f := sum(1/n^2, n = 1 .. infinity);

# Step 2: Write the series as a product of terms (1 - 1/p)
g := convert(product(1 - 1/p, p = primes), hypergeom);

# Step 3: Compare with the Taylor series of the sine function
h := series(sin(x), x = 0, 10);

# Step 4: Set up equations between corresponding terms
eq := seq(coeff(h, x, 2*k)/k!, k = 1 .. 5) =
      seq(coeff(g, x, k), k = 1 .. 5);

# Step 5: Solve the equations to find the value of the series
sol := solve({eq, seq(coeff(g, x, k) = 0, k = 6 .. 10)});

# Step 6: Replace x with pi/2 to find the value
sol_pi := subs(x = Pi/2, sol);

# Step 7: Compute the value of the series
value := sol_pi[1][2];

value;

(1/6)*Pi^2

 

1-1/primes

 

series(x-(1/6)*x^3+(1/120)*x^5-(1/5040)*x^7+(1/362880)*x^9+O(x^11),x,11)

 

(0, 0, 0, 0, 0) = (0, 0, 0, 0, 0)

 

Error, invalid input: solve expects its 1st argument, eqs, to be of type {`and`, `not`, `or`, rtable, algebraic, relation(algebraic), relation({rtable, algebraic}), {list, set}({`and`, `not`, `or`, algebraic, relation(algebraic)})}, but received {0 = 0, (0, 0, 0, 0, 0) = (0, 0, 0, 0, 0)}

 

sol

 

Error, attempting to assign to `value` which is protected.  Try declaring `local value`; see ?protect for details.

 

value

(6)

NULL

Download Het_Basel_Probleem_van_Euler.mw

1.mw.....can anyone hlep to sovle this equation...for omega(t)...
(-limit((1 - omega)^(k + 2), omega = 1, left) + 1)/(k + 2) = C*int((1 - `&sigma;_a`*sin(2*pi*N))^k, N = 0 .. N)...in solution..integral didn't get rid

This is for my understanding (and the proper use of Maple terms)

?simplify refers to them (sqrt in this case) as procedures

simplify[sqrt](16^(3/2));
                               64

`simplify/sqrt`(16^(3/2));
                               64

simplify(16^(3/2), sqrt);
                               64

?combine calls them (this time exp and trig) names of options

combine(exp(sin(a)*cos(b))*exp(cos(a)*sin(b)),[trig,exp]);#why the list?
                        exp(sin(a + b))

combine(exp(sin(a)*cos(b))*exp(cos(a)*sin(b)),trig,exp);#no list
                        exp(sin(a + b))

combine[trig](exp(sin(a)*cos(b))*exp(cos(a)*sin(b)));#no exp required?!?
                        exp(sin(a + b))

(`combine/exp`@`combine/trig`)(exp(sin(a)*cos(b))*exp(cos(a)*sin(b)));
                        exp(sin(a + b))

If the terms command options and command procedures can be used interchangeably, how does evalf[4](...) fit into this scheme? 

Is there a special Maple term for the construct "proc[n]" where proc is a procedure/command name and n is not a name but of type numeric?

First 115 116 117 118 119 120 121 Last Page 117 of 2426