Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Problem_116_Solutio.htm

Hi, would like to know if maple commands can replicate/automate this solution.

rsolve({a(n)=9/19*a(n+1)+10/19*a(n-1),a(0)=0},a)

=-9a(1)+9a(1)(10/9)^n

.......?

The following (downsized) images of Lyapunov fractals were each generated in a few seconds, in Maple 16.

 

I may make an interface for this with embedded components, or submit it in some form on the Application Center. But I thought that I'd share this version here first.

I'm just re-using the techniques in the code behind an earlier Post on Mandelbrot and Julia fractals. But I've only used one simple coloring scheme here, so far. I'll probably try the so-called burning ship escape-time fractal next.

 

 

 

 

Here below is the contents of the worksheet attached at the end of this Post.

 

 

The procedures are defined in the Startup code region of this worksheet.

 

It should run in Maple 15 and 16, but may not work in earlier versions since it relies on a properly functioning Threads:-Task.

 

The procedure `Lyapunov` can be called as

 

          Lyapunov(W, xa, xb, ya, yb, xresolution)

          Lyapunov(W, xa, xb, ya, yb, xresolution, numterms=N)

 

where those parameters are,

 

 - W, a Vector or list whose entries should be only 0 or 1

 - xa, the leftmost x-point (a float, usually greater than 2.0)

 - xb, the rightmost x-point (a float, usually less than or equal to 4.0)

 - ya, the lowest y-point (a float, usually greater than 2.0)

 - yb, the highest y-point (a float, usually less than or equal to 4.0)

 - xresolution, the width in pixels of the returned image (Array)

 - numterms=N, (optional) where positive integer N is the number of terms added for the approx. Lyapunov exponent

 

 

The speed of calculation depends on whether the Compiler  is functional and how many cores are detected. On a 4-core Intel i7 under Windows 7 the first example below had approximately the following performce in 64bit Maple 16.

 

 

Compiled

evalhf

serial (1 core)

20 seconds

240 seconds

parallel (4 cores)

5 seconds

60 seconds

 

 

 

with(ImageTools):


W:=[0,0,1,0,1]:
res1:=CodeTools:-Usage( Lyapunov(W, 2.01, 4.0, 2.01, 4.0, 500) ):

memory used=46.36MiB, alloc change=65.73MiB, cpu time=33.87s, real time=5.17s


View(res1);


W:=[1,1,1,1,1,1,0,0,0,0,0,0]:
res2:=CodeTools:-Usage( Lyapunov(W, 2.5, 3.4, 3.4, 4.0, 500) ):

memory used=30.94MiB, alloc change=0 bytes, cpu time=21.32s, real time=3.54s


View(res2);


W:=[1,0,1,0,1,1,0,1]:
res3:=CodeTools:-Usage( Lyapunov(W, 2.1, 3.7, 3.1, 4.0, 500) ):

memory used=26.18MiB, alloc change=15.09MiB, cpu time=18.44s, real time=2.95s


View(res3);


W:=[0,1]:
res4:=CodeTools:-Usage( Lyapunov(W, 2.01, 4.0, 2.01, 4.0, 500) ):

memory used=46.25MiB, alloc change=15.09MiB, cpu time=33.52s, real time=5.18s


View(res4);

 

 

Download lyapfractpost.mw

Hi, 

     I'm using fsolve in a loop, as an example can we find the first 10 roots of sin(x) and store then in an array.

 restart;

x:=array(0..10):

x[0]:=0:

for i from 1 to 10 do

x[i]:= fsolve(sin(y)=0, y=x[i-1]..10 , avoid={y=x[i-1]});

end do;
 
Firstly this solve only 0,2*Pi, 3*Pi...Why does it skip Pi? also can I change the range to x[i-1]..infinity? 

Hello Everyone,

I got a question about the inverse laplace transform of the classic second order system:

Step_Respon=1/(s*((s^2/omega_n^2)+2*zeta*s/omega_n+1))

zeta < 1

if I take the inverse laplace transform, it will give me root of (zeta^2-1) term, how can I force maple to consider the range of zeta before doing inverse laplace transform?

the follow is a code that I've started.  This code is from working template that I created previously. that works and iterates as expected, but this equations with these parameters gives me the pintf error in bold at the bottom. 
Can you please help with the error at the bottom of code that is in bold????
 
> restart;
> Digits := 14;
14
> f := proc (x) options operator, arrow; 3-x-x*exp(r*(1-x...

Hi 

does anyone know how to make a programme to find values of B^j+1 and B^j+1 where:

 

matrix([[A^j+1],[B^j+1]]) = matrix([[C,D], [E,F]])*matrix([[A^j],[ B^j])

and with the initial condition that A^j =0, B^j=1. and then run to find say A^6 etc

 

thx 

 

I created a maplet in maple using the following codes:

> restart:
> with(Maplets[Elements]):
> m5:=Maplet(
> Window('title'="Turev",
> [
> ["Fonksiyon:",TextField['Y1']()],
> ["Turev Degiskeni:",TextField['Y2'](3)],
> TextBox['TB1']('editable'='false',3..40),
> [Button("Turevi Hesapla",Evaluate('TB1'='diff(Y1,Y2)')),
> Button("Tamam",Shutdown(['Y1','Y2','TB1'])),
> Button("Temizle",SetOption('Y1'=""))]

Dear friends,

every once in a while I come across an integral that Maple does not readily compute and post it here, so that your programmers may perhaps include it in the integration engine.

I am writing today concerning the integral int(x^q/(exp(x)-1), x=0..infinity); for q a real number. Maple can do this integral for rational q but not for irrational ones, e.g. try q=14/10 vs. q=sqrt(2). I hope you can make good use of this hint. The original computation...

Lately as my computations become ever more intense, I have been having trouble with fsolve. Why exactly does fsolve sometimes return itself as in:

E:=fsolve({C1,C2,C3,C4},{c1,c2,c3,c4}}

returns--> fsolve({C1,C2,C3,C4},{c1,c2,c3,c4}}

and somtimes fsolve returns a blank.

 

What is going on internally here? Shouldn't it keep trying till it runs out of memory?

 

Thanks,

 

Pat

Hi

Does anyone know if it is possible to loglogplot a function like:

y=const, x=0..10^3

y=x^(-3/8), x=10^3..10^8

 

It would be really useful to plot.

I have added a .mw file showing the problem. I wish to calculate the integral at the bottom of the post. unfortunately the function im using defined at he beginning of the file doesnt behave well for values k larger than 25/30...

The integral I need to evaluate therefore cant be evaluated if one wants to integrate from 0 to Infinity.

Also just integrating till 20 or so is not accurate enough...

Has anybody an idea about better implementation of the problem....

I need more help with code please!

A box of candy hearts contains 52 hearts, of which 19 are white, 10 are tan, 7 are pink, 3 are purple, 5 are yellow, 2 are orange, and 6 are green. If you select 9 pieces randomly without replacement, what is the probability that A_3 of the 9 are white, and B_3 of the 9 are white, 2 are tan 1 is pink and 1 is yellow and 2 are green

19 Whites in the pack / 52 hearts in the pack = .3654 possibility of picking a white from 1 draw.

Today's SMBC strip by Zach Weinersmith is a silly math joke but it was pretty much begging for implementation.

So, here is a simple brute force Maple program to compute the Fouriest transform of an integer.

fouriest := proc(n::posint, ob::posint:=10)
local b,f,cap,i,rdx,fc;
...

How can I write code for : A coin is tossed 4x, the sequence of H and T is observed. I need to list each of the 16 sequences (which, when done manually are :

S= {hhhh,hhht,hhth,hthh,thhh,hhtt,htht,thth,tthh,thht,htth,ttth,ttht,thtt,httt,tttt}

b) Let events A,B,C,D be given A= {at least 3 heads}, B= {at most 2 heads}, C= {heads on the third toss}, D= {1 head and 3 tails}. If the probability set function assigns 1/16 to each outcome in the sample space find ...

I am trying to evalute a double integral symbolically using Maple 15.  I have gotten it to work when some of the parameters are specific numbers, but it won't work if I use variables, even if I assume sufficient conditions on them for the integral to make sense.  I have tried to use AllSolutions but it didn't work.  Breaking it down into steps isn't working either. 

I am working on a file on a remote server and I don't think I can upload it here. ...

First 1506 1507 1508 1509 1510 1511 1512 Last Page 1508 of 2224