Ronan

287 Reputation

13 Badges

9 years, 102 days
East Grinstead, United Kingdom

MaplePrimes Activity


These are questions asked by Ronan

I was taking notes from a video and fromatting them in a table so I could pring them.

I an using the commands in the context panel to keep things neat.

I can't get this to work for the last row of the table. when I select the equation, the right context panel changes to information about the table and the commands for manipulating the equations are not available. This occurs on the tenth row or later. 

I have since tried interface(rtablesize = [12,12]) but that didnt help.

If I run the document I can get the 10th row to solve by displaying the output first and then using the commands from the context panel

         
             

2*a[0]*a[9]*c[2] + 2*a[1]*a[8]*c[2] + 2*a[2]*a[7]*c[2] + 2*a[3]*a[6]*c[2] + 2*a[4]*a[5]*c[2] + a[9]*c[1];
 
                              8            
                     1430 c[2]             
                     ---------- + a[9] c[1]
                           16              
                       c[1]                

                             "(->)"

solve( 1430*c[2]^8/c[1]^16 + a[9]*c[1]=0, a[9] );
                                     8
                            1430 c[2] 
                          - ----------
                                  17  
                              c[1]    

                             "(->)"

a[9] := -1430*c[2]^8/c[1]^17: 'a[9]';
                              a[9]


           

Edited:- to improve readability and add more information.

restart

 

NULL

NULL``

                                                           

 

a[0] := 0

2*a[0]*a[1]*c[2]+a[1]*c[1]+1 = 0"(->)"-1/c[1]"(->)"a[1]NULL

2*a[0]*a[2]*c[2]+a[1]^2*c[2]+a[2]*c[1] = 0"(->)"-c[2]/c[1]^3"(->)"a[2]NULL

2*a[0]*a[3]*c[2]+2*a[1]*a[2]*c[2]+a[3]*c[1] = 0"(->)"-2*c[2]^2/c[1]^5"(->)"a[3]

2*a[0]*a[4]*c[2]+2*a[1]*a[3]*c[2]+a[2]^2*c[2]+a[4]*c[1] = 0"(->)"-5*c[2]^3/c[1]^7"(->)"a[4]

2*a[0]*a[5]*c[2]+2*a[1]*a[4]*c[2]+2*a[2]*a[3]*c[2]+a[5]*c[1] = 0"(->)"-14*c[2]^4/c[1]^9"(->)"a[5]NULL

2*a[0]*a[6]*c[2]+2*a[1]*a[5]*c[2]+2*a[2]*a[4]*c[2]+a[3]^2*c[2]+a[6]*c[1]"(->)"-42*c[2]^5/c[1]^11"(->)"a[6]

2*a[0]*a[7]*c[2]+2*a[1]*a[6]*c[2]+2*a[2]*a[5]*c[2]+2*a[3]*a[4]*c[2]+a[7]*c[1]"(->)"-132*c[2]^6/c[1]^13"(->)"a[7]

2*a[0]*a[8]*c[2]+2*a[1]*a[7]*c[2]+2*a[2]*a[6]*c[2]+2*a[3]*a[5]*c[2]+a[4]^2*c[2]+a[8]*c[1]"(->)"-429*c[2]^7/c[1]^15"(->)"a[8]

2*a[0]*a[9]*c[2]+2*a[1]*a[8]*c[2]+2*a[2]*a[7]*c[2]+2*a[3]*a[6]*c[2]+2*a[4]*a[5]*c[2]+a[9]*c[1]

 

 

NULL


 

Download Table_solve_issue.mw

I trying to display factorials in a matrix as e.g 6!4!/5! not 144.
 

restart

with(InertForm)

[ConvertToString, Display, FromMathContainer, MakeInert, NoSimpl, Parse, SameStructure, ToMathContainer, ToMathML, Typeset, Value]

(1)

M := Matrix(4, 4); for m from 0 to 4 do for n from 0 to 4 do M(m+1, n+1) := factorial(NoSimpl(2*m+3*n))/(factorial(NoSimpl(m+2*n+1))*factorial(NoSimpl(m))*factorial(NoSimpl(n))) end do end do; M

Matrix(%id = 36893490820101234804)

(2)

NULL


 

Download How_to_display_factorial_unevaluated.mw

I want to sum a series by getting multiple values from a list.  Based on the list L I was trying

add(A, [m2, m3] in L)   This seem to have dissapeared from the document but the error message remains.

restart

``

NULL

NULL

A := factorial(2*m2+3*m3)*c0^(1+m2+2*m3)*c2^m2*c3^m3/(factorial(1+m2+2*m3)*factorial(m2)*factorial(m3)*c1^(2*m2+3*m3+1))

factorial(2*m2+3*m3)*c0^(1+m2+2*m3)*c2^m2*c3^m3/(factorial(1+m2+2*m3)*factorial(m2)*factorial(m3)*c1^(2*m2+3*m3+1))

(1)

"P:=3, N:=4"

4

(2)

``

I found this code by Kitonum 16740  https://www.mapleprimes.com/questions/138955-How-Do-I-Create-A-Variable-Number-Of-Nested-Loops-

S := {seq(0 .. N)}; l := P-1; f := proc (T) options operator, arrow; [seq(seq([op(T[j]), S[i]], i = 1 .. nops(S)), j = 1 .. nops(T))] end proc; L := (f@@l)([[]])

[[0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [1, 0], [1, 1], [1, 2], [1, 3], [1, 4], [2, 0], [2, 1], [2, 2], [2, 3], [2, 4], [3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [4, 0], [4, 1], [4, 2], [4, 3], [4, 4]]

(3)

nops(L)

25

(4)

NULLNULL

``

nops(L)

25

(5)

Instead of using add(add(A, m2 = 0 .. 4)*m3 = 0 .. 4)I would like to map m2 and m3 to the values in list L and sum them. This should give a method for having a variable number of loops

I tried variants off without success

 

add(A, `in`([m2, m3], L))

Error, illegal use of an object as a name

 

 

 

 

 

for the next higher order would need to map m2,m3, m4 to the generated list.

 

 

 

B := factorial(2*m2+3*m3+4*m4)*c0^(1+m2+2*m3+3*m4)*c2^m2*c3^m3*c4^m4/(factorial(1+m2+2*m3+3*m4)*factorial(m2)*factorial(m3)*factorial(m4)*c1^(2*m2+3*m3+4*m4+1))

factorial(2*m2+3*m3+4*m4)*c0^(1+m2+2*m3+3*m4)*c2^m2*c3^m3*c4^m4/(factorial(1+m2+2*m3+3*m4)*factorial(m2)*factorial(m3)*factorial(m4)*c1^(2*m2+3*m3+4*m4+1))

(6)

P := 4; S := {seq(0 .. N)}; l := P-1; f := proc (T) options operator, arrow; [seq(seq([op(T[j]), S[i]], i = 1 .. nops(S)), j = 1 .. nops(T))] end proc; L := (f@@l)([[]])

[[0, 0, 0], [0, 0, 1], [0, 0, 2], [0, 0, 3], [0, 0, 4], [0, 1, 0], [0, 1, 1], [0, 1, 2], [0, 1, 3], [0, 1, 4], [0, 2, 0], [0, 2, 1], [0, 2, 2], [0, 2, 3], [0, 2, 4], [0, 3, 0], [0, 3, 1], [0, 3, 2], [0, 3, 3], [0, 3, 4], [0, 4, 0], [0, 4, 1], [0, 4, 2], [0, 4, 3], [0, 4, 4], [1, 0, 0], [1, 0, 1], [1, 0, 2], [1, 0, 3], [1, 0, 4], [1, 1, 0], [1, 1, 1], [1, 1, 2], [1, 1, 3], [1, 1, 4], [1, 2, 0], [1, 2, 1], [1, 2, 2], [1, 2, 3], [1, 2, 4], [1, 3, 0], [1, 3, 1], [1, 3, 2], [1, 3, 3], [1, 3, 4], [1, 4, 0], [1, 4, 1], [1, 4, 2], [1, 4, 3], [1, 4, 4], [2, 0, 0], [2, 0, 1], [2, 0, 2], [2, 0, 3], [2, 0, 4], [2, 1, 0], [2, 1, 1], [2, 1, 2], [2, 1, 3], [2, 1, 4], [2, 2, 0], [2, 2, 1], [2, 2, 2], [2, 2, 3], [2, 2, 4], [2, 3, 0], [2, 3, 1], [2, 3, 2], [2, 3, 3], [2, 3, 4], [2, 4, 0], [2, 4, 1], [2, 4, 2], [2, 4, 3], [2, 4, 4], [3, 0, 0], [3, 0, 1], [3, 0, 2], [3, 0, 3], [3, 0, 4], [3, 1, 0], [3, 1, 1], [3, 1, 2], [3, 1, 3], [3, 1, 4], [3, 2, 0], [3, 2, 1], [3, 2, 2], [3, 2, 3], [3, 2, 4], [3, 3, 0], [3, 3, 1], [3, 3, 2], [3, 3, 3], [3, 3, 4], [3, 4, 0], [3, 4, 1], [3, 4, 2], [3, 4, 3], [3, 4, 4], [4, 0, 0], [4, 0, 1], [4, 0, 2], [4, 0, 3], [4, 0, 4], [4, 1, 0], [4, 1, 1], [4, 1, 2], [4, 1, 3], [4, 1, 4], [4, 2, 0], [4, 2, 1], [4, 2, 2], [4, 2, 3], [4, 2, 4], [4, 3, 0], [4, 3, 1], [4, 3, 2], [4, 3, 3], [4, 3, 4], [4, 4, 0], [4, 4, 1], [4, 4, 2], [4, 4, 3], [4, 4, 4]]

(7)

nops(L)

125

(8)

NULL


 

Download Sum_by_mapping_to_a_list_question.mw

I have two summations that Maple converts to hypergeometric outputs. Is there a way to stop that?

I dont know how to get Maple to expand the Hyper geometric output for a given walue of N

if the value of N is defined first the output is as I would expect.

The real problem, the sumations are nested and when I get to four nested sums Maple sits there for hours trying to evaluate the general case. 

I have only included the first 2 summations.

Any insights on this would be appreciated.
 

restart

NULL

NULL

NULL

``

``

a := -(sum(C2^(m-1)*C0^m*factorial(2*m)/(C1^(2*m-1)*factorial(m+1)*factorial(m)), m = 0 .. N))

-2*C1/(C2*(1+(-(4*C0*C2-C1^2)/C1^2)^(1/2)))+C2^N*C0^(N+1)*GAMMA(2*N+3)*(N+2)*hypergeom([1, 3/2+N], [N+3], 4*C0*C2/C1^2)/(C1^(2*N+1)*GAMMA(N+3)^2)

(1)

N := 4

4

(2)

a

-2*C1/(C2*(1+(-(4*C0*C2-C1^2)/C1^2)^(1/2)))+42*C2^4*C0^5*hypergeom([1, 11/2], [7], 4*C0*C2/C1^2)/C1^9

(3)

b := -(sum(C2^(m-1)*C0^m*factorial(2*m)/(C1^(2*m-1)*factorial(m+1)*factorial(m)), m = 0 .. N))

-C1/C2-C0/C1-2*C2*C0^2/C1^3-5*C2^2*C0^3/C1^5-14*C2^3*C0^4/C1^7

(4)

NULL

NULL``

unassign('N')

c := sum(sum((-1)^(m[3]+1)*factorial(2*m[2]+3*m[3])*C0^(1+m[2]+2*m[3])*C2^m[2]*C3^m[3]/(factorial(1+m[2]+2*m[3])*factorial(m[2])*factorial(m[3])*C1^(1+2*m[2]+3*m[3])), m[3] = 0 .. N), m[2] = 0 .. N)

sum(C2^m[2]*(-factorial(2*m[2])*C0^(1+m[2])*hypergeom([(2/3)*m[2]+1, (2/3)*m[2]+2/3, 1/3+(2/3)*m[2]], [1+(1/2)*m[2], 3/2+(1/2)*m[2]], -(27/4)*C0^2*C3/C1^3)/(factorial(1+m[2])*C1^(1+2*m[2]))-factorial(2*m[2]+3*N+3)*C0^(3+m[2]+2*N)*C3^(N+1)*hypergeom([1, (2/3)*m[2]+2+N, 5/3+(2/3)*m[2]+N, 4/3+(2/3)*m[2]+N], [N+2, 2+(1/2)*m[2]+N, 5/2+(1/2)*m[2]+N], -(27/4)*C0^2*C3/C1^3)*(-1)^N/(factorial(3+m[2]+2*N)*factorial(N+1)*C1^(4+2*m[2]+3*N)))/factorial(m[2]), m[2] = 0 .. N)

(5)

NULL

NULLN := 4

4

(6)

c

-C0*hypergeom([1/3, 2/3], [3/2], -(27/4)*C0^2*C3/C1^3)/C1-273*C0^11*C3^5*hypergeom([1, 16/3, 17/3], [6, 13/2], -(27/4)*C0^2*C3/C1^3)/C1^16+C2*(-C0^2*hypergeom([1, 4/3, 5/3], [3/2, 2], -(27/4)*C0^2*C3/C1^3)/C1^3-6188*C0^12*C3^5*hypergeom([1, 19/3, 20/3], [13/2, 7], -(27/4)*C0^2*C3/C1^3)/C1^18)+(1/2)*C2^2*(-4*C0^3*hypergeom([5/3, 7/3], [5/2], -(27/4)*C0^2*C3/C1^3)/C1^5-162792*C0^13*C3^5*hypergeom([1, 20/3, 22/3], [6, 15/2], -(27/4)*C0^2*C3/C1^3)/C1^20)+(1/6)*C2^3*(-30*C0^4*hypergeom([7/3, 8/3], [5/2], -(27/4)*C0^2*C3/C1^3)/C1^7-4883760*C0^14*C3^5*hypergeom([1, 22/3, 23/3], [6, 15/2], -(27/4)*C0^2*C3/C1^3)/C1^22)+(1/24)*C2^4*(-336*C0^5*hypergeom([10/3, 11/3], [7/2], -(27/4)*C0^2*C3/C1^3)/C1^9-164745504*C0^15*C3^5*hypergeom([1, 25/3, 26/3], [6, 17/2], -(27/4)*C0^2*C3/C1^3)/C1^24)

(7)

NULL

e := sum(sum((-1)^(m[3]+1)*factorial(2*m[2]+3*m[3])*C0^(1+m[2]+2*m[3])*C2^m[2]*C3^m[3]/(factorial(1+m[2]+2*m[3])*factorial(m[2])*factorial(m[3])*C1^(1+2*m[2]+3*m[3])), m[3] = 0 .. N), m[2] = 0 .. N)

-C0/C1-5*C2^3*C0^4/C1^7-C2*C0^2/C1^3-2*C2^2*C0^3/C1^5-3*C0^5*C3^2/C1^7+12*C0^7*C3^3/C1^10-55*C0^9*C3^4/C1^13-14*C0^5*C2^4/C1^9+C0^3*C3/C1^4+330*C0^7*C2^4*C3/C1^12-5005*C0^9*C2^4*C3^2/C1^15+61880*C0^11*C2^4*C3^3/C1^18-678300*C0^13*C2^4*C3^4/C1^21+5*C0^4*C2*C3/C1^6-28*C0^6*C2*C3^2/C1^9+165*C0^8*C2*C3^3/C1^12-1001*C0^10*C2*C3^4/C1^15+21*C0^5*C2^2*C3/C1^8-180*C0^7*C2^2*C3^2/C1^11+1430*C0^9*C2^2*C3^3/C1^14-10920*C0^11*C2^2*C3^4/C1^17+84*C0^6*C2^3*C3/C1^10-990*C0^8*C2^3*C3^2/C1^13+10010*C0^10*C2^3*C3^3/C1^16-92820*C0^12*C2^3*C3^4/C1^19

(8)

NULL


 

Download why_hypergeom.mw

I am trying to rearrange the elements of an equation by the absolute value of their coefficients. eg -3y^2 x+2x z^2+6z^2 to

2x z^2 -3y^2 +6z^2 

 

Download Rearange_test.mwRearange_test.mw

1 2 3 4 5 6 7 Last Page 1 of 16