Ronan

1207 Reputation

14 Badges

12 years, 210 days
East Grinstead, United Kingdom

MaplePrimes Activity


These are questions asked by Ronan

How should I handle the limit in the integration answe?. I don't see why it is necessary.

restart

_local(gamma)

p := `assuming`([proc (alpha) options operator, arrow; alpha^m end proc], [m]); LinearAlgebra:-Transpose(integer)

integer

q := `assuming`([proc (alpha) options operator, arrow; alpha^n end proc], [n]); LinearAlgebra:-Transpose(integer)

integer

Sa := eval((1/2)*(int(simplify(p(alpha)*(D(q))(alpha)), alpha = 0 .. 1)))

-(1/2)*(limit(alpha^(m+n), alpha = 0, right)-1)*n/(m+n)

s1 := eval((1/2)*(int(simplify(p(alpha)*(D(q))(alpha)), alpha)))

(1/2)*alpha^(m+n)*n/(m+n)

eval(s1, alpha = 1)-(eval(s1, alpha = 0))

(1/2)*n/(m+n)

NULL

Download Q_9-9-22_limit_in_integral.mw

I would like to insert a hyperling to a geogebra document but the hyperlink box deosn't appear to allow general files. Can this be done?

I have a long description that contains some Maple commands.
I dont want to use # as the lines dont show up when i use

Isee:=proc(a)
    interface(verboseproc = 3);
    printf("%P", eval(a));
end proc

The long description is. Any way around the problem?  

Test:=proc(A,B,C)  description  "Computes projective line through 2 projective points or intersert of 2 projective lines as a projective point or coincidence of piont  line   
 Does some checking on validity of inputs.   
Mobposn:- Global Variable, must = 1 or 3. 
Points are returned as <1,x,y> or <x,y,1>   
 Lines are returned as <z,x,y> or <x,y,z>,  
normalgpt :- Global Variable must be 0 or 1. 
Points with algecraic elements are not reduced to <1,x,y> or <x,y,1> if 0  
 Points are defined as row vectors and  lines as column `vectors"`; 

 print(A,B,A-C); 

 end proc;

I need to conver 2D points to projective points. Originally I used lists but now need to handle vectors too. To add to that that the projective coordinate for points is now being stated as [1,x,y] instead of [x,y,1]. That is was easy enough to handle for lists.

I have a lot of old worksheets that use the list form [x,y,1] that I want to maintain compatibility with. I only have one procedure I need to convert.
 

Mobposn := 1;
testP := [2, 7];
if Mobposn = 1 then
    [1, op(testP)];
else
    [op(testP), 1];
end if;

I need to do the same for vector definition of the points. The points are defined as row Vectors

A:=<2,7>^%T

to get

Ap:=<1,2,7>^%T

or

Ap:=<2,7,1>^%T

I know coud just do (as these are short vectors)
 

Ap:=<1,A_1,A_2>^%T

or
Ap:=<A_1,A_2,1>^%T

Is there a more general way?

I want to collect up the equation terms by the numerical value of the terms coefficient? Have tried sort collect combine...
So far the best I have come up with is nops(indets(on each term). And put them in seperate lists. This still doesn't quiet do the trick.
I am looking to achieve. Would to happy to have then as seperate lists or equations.

(a_1^5+a_2^5...)+5(a_1^4a_2+a_1^4a_3....)+10(a_1^3a_2^2 ....)+20(  ....   )+......+60(a_1^2a_2a_3a_4+ a_1a_2^2a_3a_4....)


 

restart

pn := (a[1]+a[2]+a[3]+a[4])^5

(a[1]+a[2]+a[3]+a[4])^5

pn1 := expand(pn)

a[1]^5+5*a[1]^4*a[2]+5*a[1]^4*a[3]+5*a[1]^4*a[4]+10*a[1]^3*a[2]^2+20*a[1]^3*a[2]*a[3]+20*a[1]^3*a[2]*a[4]+10*a[1]^3*a[3]^2+20*a[1]^3*a[3]*a[4]+10*a[1]^3*a[4]^2+10*a[1]^2*a[2]^3+30*a[1]^2*a[2]^2*a[3]+30*a[1]^2*a[2]^2*a[4]+30*a[1]^2*a[2]*a[3]^2+60*a[1]^2*a[2]*a[3]*a[4]+30*a[1]^2*a[2]*a[4]^2+10*a[1]^2*a[3]^3+30*a[1]^2*a[3]^2*a[4]+30*a[1]^2*a[3]*a[4]^2+10*a[1]^2*a[4]^3+5*a[1]*a[2]^4+20*a[1]*a[2]^3*a[3]+20*a[1]*a[2]^3*a[4]+30*a[1]*a[2]^2*a[3]^2+60*a[1]*a[2]^2*a[3]*a[4]+30*a[1]*a[2]^2*a[4]^2+20*a[1]*a[2]*a[3]^3+60*a[1]*a[2]*a[3]^2*a[4]+60*a[1]*a[2]*a[3]*a[4]^2+20*a[1]*a[2]*a[4]^3+5*a[1]*a[3]^4+20*a[1]*a[3]^3*a[4]+30*a[1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4+a[2]^5+5*a[2]^4*a[3]+5*a[2]^4*a[4]+10*a[2]^3*a[3]^2+20*a[2]^3*a[3]*a[4]+10*a[2]^3*a[4]^2+10*a[2]^2*a[3]^3+30*a[2]^2*a[3]^2*a[4]+30*a[2]^2*a[3]*a[4]^2+10*a[2]^2*a[4]^3+5*a[2]*a[3]^4+20*a[2]*a[3]^3*a[4]+30*a[2]*a[3]^2*a[4]^2+20*a[2]*a[3]*a[4]^3+5*a[2]*a[4]^4+a[3]^5+5*a[3]^4*a[4]+10*a[3]^3*a[4]^2+10*a[3]^2*a[4]^3+5*a[3]*a[4]^4+a[4]^5

L1 := []; L2 := []; L3 := []; L4 := []; for i to nops(els) do if nops(indets(els[i])) = 1 then L1 := [op(L1), els[i]] elif nops(indets(els[i])) = 2 then L2 := [op(L2), els[i]] elif nops(indets(els[i])) = 3 then L3 := [op(L3), els[i]] else L4 := [op(L4), els[i]] end if end do; L1; L2; L3; L4

[60*a[1]*a[2]*a[3]*a[4]^2, 60*a[1]*a[2]*a[3]^2*a[4], 60*a[1]*a[2]^2*a[3]*a[4], 60*a[1]^2*a[2]*a[3]*a[4]]

indets(els[7])

{a[1], a[4]}

NULL

indets(els(5))

{}

`~`[op](1 .. -1, L2)

[5, a[1], a[2]^4, 5, a[1], a[3]^4, 5, a[1], a[4]^4, 10, a[1]^2, a[2]^3, 10, a[1]^2, a[3]^3, 10, a[1]^2, a[4]^3, 10, a[1]^3, a[2]^2, 10, a[1]^3, a[3]^2, 10, a[1]^3, a[4]^2, 5, a[1]^4, a[2], 5, a[1]^4, a[3], 5, a[1]^4, a[4], 5, a[2], a[3]^4, 5, a[2], a[4]^4, 10, a[2]^2, a[3]^3, 10, a[2]^2, a[4]^3, 10, a[2]^3, a[3]^2, 10, a[2]^3, a[4]^2, 5, a[2]^4, a[3], 5, a[2]^4, a[4], 5, a[3], a[4]^4, 10, a[3]^2, a[4]^3, 10, a[3]^3, a[4]^2, 5, a[3]^4, a[4]]

NULL

op(2, L2[1])

a[1]

op(3, L2[1])

a[2]^4``

Download 30-7-22_Q_sort_equation_by_numerical_coeffs.mw

First 12 13 14 15 16 17 18 Last Page 14 of 32