Maple 2015 Questions and Posts

These are Posts and Questions associated with the product, Maple 2015

>assume(x>0, n>0):int(x^n*ln(x)^n,x);

I_Mariusz

I am currently working in Maple, following an example on the Maplesoft site very closely. I am trying to make use of the 'Colorize' function in the Escape-Time Fractals package.

I have a Newton's basin with the standard colouring but am trying to make my image more sophisticated. I have tried following the example given for the Mandelbrot set (At the bottom of the page - http://www.maplesoft.com/support/help/Maple/view.aspx?path=Fractals/EscapeTime/Mandelbrot) as there isn't one on the Newton Fracal page but keep receiving the Kernel lost message. I do not think the issue is my firewall.

My code is as follows,

with(Fractals:-EscapeTime);


with(ImageTools);

 

Everything works up until I go to evaluate P. I have tried giving both Arrays datatype=float[8] and have tried getting rid of the datatype section completely as to use the default. Neither of these have helped.

Any insight as to why this may be happening would be appreciated.

Hello,

Paraphrasing:

https://en.m.wikipedia.org/wiki/Langford_pairing

given a sequence of 2n numbers 1,1,2,2,3,3,...n,n in which the two 1's are 1 slot apart, the two 2's are 2 slots apart, the two 3's are 3 slots apart, -> generally the two n's are n slots apart.

for n=3, a possible sequence is [2,3,1,2,1,3]. 

There is sequences for n=4,7,8...

i havent a clue how to write a maple procedure to generate a sequence for given n, but I'm hoping an expert here can.

I'm trying to write a procedure that computes Pollard's P-1 Method for a given integer n, and then outputs the prime factorisation of n.

Here is what I have so far:

Pollard := proc (n)
local i, r, g;
r[1] := `mod`(2^factorial(2), n);
for i from 2 while gcd(`mod`(r[i-1]-1, n), n) = 1 do
r[i] := `mod`(2^factorial(i+1), n) end do;
g[i] := gcd(`mod`(r[i-1]-1, n), n);
if g[i] < n then return g[i]
else return n
end if
end proc;

But my procedure doesn't seem to work for a lot of large values for n.
And also I can't figure out how to make it actually output the factorisation.

Any help would be appreciated.

Maybe this is trivial but could somebody tell me how to get bounds of interval returned by shake? For instance,

shake(sqrt(2)) gives INTERVAL(1.41421356167 .. 1.41421356308), and I would like to store the upper and lower bounds as rational numbers in two variables. 

how draw a line x+y = 1 on a sphere x^2+y^2+z^2 = 1 in maple

Hello, I have a somewhat math and Maple question I'm hoping some can help with.

I have this curve,

curve:=alpha^2*beta^10-alpha^2*beta^9+4*alpha*beta^7-2*alpha*beta^6-2*alpha*beta^5-alpha*beta^4+alpha*beta^3-2*beta+1;

and if I solve this system (numerically);

sol:= solve([curve=0,diff(curve,beta)=0],[alpha,beta]);

I get 6 special points (8 actually but two are critical). So I'll refer to them by subscript "i".

If I then do a coordinate transformation by;

alpha=exp(u)

beta=exp(v)

and convert the 6 coordinates and curve, I'll get everything in terms of (u,v) coordinates.

curve2:=subs([alpha=exp(u),beta=exp(v)],curve);

soluv:=map(ln,sol);  (this is just pseudo - I don't know how to do it this way)

So now the 6 points are referred to by (u_i,v_i).

Next, I want to expand this curve locally around these six points, using the following (where "z" is the local coordinate);

u -> u_i + z^2

v -> v_i + sum(a_j*z^j,j=1..n)

where n is reasonable, though around 15.

curve3(i):=subs(u=z^2 + cat(Ubp,i),curve2);

curve4(i,n):=subs(v=cat(Vbp,i)+sum(a[i,j]*z^j,j=1..n),curve3(i));

Here, I'm not sure of the pros/cons of cat() vs a[i,j]....

 

Anyway, I'll then have an equation in terms of only the local coordinate "z". If I then solve each coefficient of "z", at each order, I should then be able to determine the power series v(z). I reason that since the curve is initially equal to zero, that every non-zero power of z will have a coefficient/equation (in terms of unknowns a[i,j]) that should be equal to zero.

This is analagous to solving differential equations with power series...

 

However, I'm a little lost in implementing this,

I am currently trying, for instance,

l1:= series(curve4(1,10),z,0,9);

e1:= seq(coeff(l1,z,i),i=1..4):

s1:=seq(a[1,j],j=1..4):

sol:=solve(e1,s1);

I believe I am doing something wrong though bcause every odd power is zero.

 

Thank you a lot for any suggestions and/or help,

sbh

PS>

Ubp and Vbp are those 6 points - I just kept them as symbols initially because I was still getting odd-powered coefficients as zero, regardless of their actual values. Hence a little bit of the "math" side of the problem...

Is it possible to create a sumif function, like the one in excel?

Experts.

When I subtract (in base 10) 235 (octal digits) from its reverse I get  [-1,-1,2]. converting this list to number equals 189 (base 10)....divisible by 7. [I would think the list would be [9,8,1] ;

in wolfram alpha 532 base 8 - 235  base 8 = 189 base 10 ).

Converting 189 to octal yields 275. All this is done correctly in Maple.

Now when I add 275 base 8 to 572 (edit: not 575 as I had before) base 8 I should get 1067 base 8, but I don't....

for sure i've done something silly

octal.mw

Is this what is supposed to happen when linking Maple to Matlab?  I was hoping it would open the actual Matlab program and write variables to the current worksheet.  I'm I missing something?

Nothing even pops up on the Matlab Command window. What good is this?

 

I want to define a proc in Maple which gets an integer n and gives a set of arrays like {1,2,3}^n, meaning {[a[1],...,a[n]]|for all 1<=i<=n a[i] in {1,2,3}}. For a fix n, obviously one can use n-for, for example when n is 2

A:=Array(1..3,1..3):
for a[1] from 1 by 1 to 3 do
 for a[2] from 1 by 1 to 3 do
  A(a[1],a[2]):=[a[1],a[2]];
 end for:
end for:

But when n is not fixed, how can I tell Maple to consider n for?! Also how can ask him to make a n-dimensional array?

I'm trying to solve a recurrence relation by generating terms and looking for a pattern.  I've learned that i can't stop 

Maple's autosimplification process and the best I can do is use Parse from the InertForm package.  The hand drawn picture below is what I'm trying to replicate.  I know I can use rsolve but I'm trying to do the steps I would with pencil and paper.

 

Hi. Is there a maple function which can interpolate values from a simple table:

given (x,y) compute z value

eg z(0.5,0.5)=1.5

x:=[0,1,2];y:=[0,1,2]

array:=[0,2,4;1,3,5;2,4,6] #probably the wrong input, but you get the idea

ArrayInterpolation?

there is a method in vba:

http://www.tushar-mehta.com/excel/newsgroups/interpolation/#Two_dimensional_interpolation_

Is there a way to apply op to an expression and get back every possible operand and the corresponding list value?  I sometimes don't know how far to go with a list of inputs to get what I want.

Leading on from this post I made before:

http://www.mapleprimes.com/questions/210359-Integrating-Very-Large-Sums

I have a script that can now integrate larger sums thanks to the tips I was given. I now have a question regarding cpu usage when the calculation is run through a loop. I have attached two files. One contains the sum (large_sum.txt) which is then read in to the main Maple script (large_sum_int.mw).

When the loop is run, the first few points are calculated quite consistently with very similar cpu times. However, as the calculation progresses the cpu time suddenly increases (with larger sums than the one given it is a very severe increase) it then decreases again and returns to the time it took for the initial points to be calculated.

Is there a reason there is a sticking point in this calculation? is there a more efficient way to simplify it before it reaches the integration stage? When using simplify(...,size) the initial block takes a very long time to execute hence is not included here. This is not the largest sum that needs to be processed so I am looking for means to speed up calculation time/make it more consistent.

Any help is appreciated

large_sum.txt

large_sum_int.mw

-Yeti

First 47 48 49 50 51 52 53 Last Page 49 of 71