MaplePrimes Questions

Dear maple users,

I am solving around 170 linear algebraic equations (symbolic) using linearalgebra " solve" command. I see the cpu usage is only 15%; as I the cpu is  i-7, octacore ,15% means around 1 core is in use. With time (12 hours)  cpu usage goes down to 0% showing free memory approx 0.

Why  is it happening? Is it due to high memory usage in storing large symobic expressions? Is there a way to engage all the cores( 100% Cpu)?

Thanks and regards.

Amor

Hi,

As a notional example those instructions generate 21 variables and around 4 Giga Bytes of data (bottom right of the Maple window ; roughly the same value read from the windows manager)

with(Statistics):
for n from 1 to 10 do
   X__||n := RandomVariable(Uniform(0,1)):
   S__||n := Sample(X__||n, 10^8)
end do:

I want to clean some part of the  memory ; for instance all the S__||n.
The following doesn't work

KeepVars := { seq(X__||n, n=1..10)}:
unassign({anames(user)} minus KeepVars ) ;
gc();


Is there a way to deallocate the memory occupied by some of my user variables ?
 

 

Hi there,

I was doing an exercise on maple as given above.I've tried to eliminate the warnings in green box by typing "local" in the relevant codes but without success. How should I proceed?

Thanks

I want to find an approximation for a 3-dim vector y(t)=(y1,y2,y3) at multiple times t, so as to get:

y(t1)=[b0,0,0](y1(t1))^0(y2(t1))^0(y3(t1))^0 + [b0,0,1](y1(t1))^0(y2(t1))^0(y3(t1))^1 + ... + [b3,0,0](y1(t1))^3(y2(t1))^0(y3(t1))^0

y(t2)=[b0,0,0](y1(t2))^0(y2(t2))^0(y3(t2))^0 + [b0,0,1](y1(t2))^0(y2(t2))^0(y3(t2))^1 + ... + [b3,0,0](y1(t2))^3(y2(t2))^0(y3(t2))^0

...

So I want 20 b coefficients with quaternary-base subscripts (I belive it is called) for multiple values of t.

I want to have enough approximations to solve for the the coefficients b and then perform a Least Squares method Calculation thereafter. 

Can anyone help me please?

Hello

I have an 8x8 sytem of equations where I can easily solve the first 2 equations by hand. If I solve the full system in Maple it gives me some ugly expressions and I would like to simplify it. I know that, at least some of it, can be simplified since I have solved two equations by hand. It is easy to show that N_M=(W_M/(B*K_A^(1-B)))^(1/(B-1)) and X_N=(W_M/(B*K_A^(1-B)))^(B/(B-1))*K_M^(1-B), but Maple gives me some result with logarithms.

Can anyone help me solve this system of equations and get some nice solutions, if at all possible?

Thank you!

Yoy can find my Maple file at: https://drive.google.com/open?id=0B5luBKCBLzmeM2MxNmFoQkdoRVk

test := proc(x) print("x=", x); op(0, x) = f end proc:
applyrule(conditional(x::anything, _test(x)) = 0, f(1));
                           "x=", f(1)
                            "x=", 0
                               0

test := proc(x) print("x=", x); op(0, x) = g end proc:
applyrule(conditional(x::anything, _test(x)) = 0, f(1));
                               0

First, I think this is wrong. Second, how to make applyrule forget the (apparently) cached result? Third, if it doesn't like me using the underscore with my own function, is there a way to rewrite conditional without it?

EDIT: As Carl pointed out here, gc() can be used as a kind of a universal forget() function. The second applyrule correctly returns f(1) after gc().

1. The results are incorrect, because the integral diverges and the p.v. integral exists but is real-valued:

int(1/((1-16*t^2)*sqrt(1-t^2)*sqrt(1-4*t^2)), t = 0 .. 1/2);
                       (1/2)*EllipticPi(4, 1/2)

int(1/((1-16*t^2)*sqrt(1-t^2)*sqrt(1-4*t^2)), t = 0 .. 1/2, CauchyPrincipalValue);
                       (1/2)*EllipticPi(4, 1/2)

This integral converges, but the closed form is wrong:

int(1/((1-1/4*t^2)*sqrt(1-t^2)*sqrt(1-4*t^2)), t = 0 .. 3/2);
                       (1/2)*EllipticK(1/2)-(1/2)*EllipticF(2/3, 1/2)-(1/2)*EllipticPi(4, 1/2)+
                       (1/2)*EllipticPi(2/3, 4, 1/2)-(1/2*I)*EllipticK((1/2)*sqrt(3))-
                       (1/30*I)*EllipticPi(4/5, (1/2)*sqrt(3))+(1/2)*EllipticPi(1/16, 1/2)

2. The series expansion is wrong, because EllipticPi(1/4,16,2) is undefined:

series(EllipticPi(1/4+a, 16, 2), a = 0, 2);
                      EllipticPi(1/4, 16, 2)-(1/45)*sqrt(3)*sqrt(15)*ln(a)+O(a)

3. None of the methods listed on the evalf/Int page can handle this integral:

evalf(Int(1/((1-1/4*t^2)*sqrt(1-t^2)*sqrt(1-4*t^2)), t = 0 .. 3/2));

Although it can be done by splitting the integration range into 0..1/2, 1/2..1, 1..3/2.

None of the methods listed on the evalf/Int page can handle this computation:

evalf(Int(1/((1-1/4*t^2)*sqrt(1-t^2)*sqrt(1-4*t^2)), t = 1 .. 2-10^(-7), digits = 20));

4. Since there are values of the parameters for which the integral diverges, this probably needs a condition saying that 1/sqrt(n) and -1/sqrt(n) are not on the segment [0,z]:

FunctionAdvisor(integral_form, EllipticPi(z, n, k));
                      [EllipticPi(z, n, k) = Int(1/((-n*`_α1`^2+1)*sqrt(-`_α1`^2+1)*
                         sqrt(-k^2*`_α1`^2+1)), `_α1` = 0 .. z),
                       `with no restrictions on `(z, n, k)]

Besides, for z=-1-I, n=1/4, k=2, the lhs and the rhs do not agree:

evalf(subs({z = -1-I, n=1/4, k=2}, %[1]));
                      -.1413755772+1.748734618*I = -.1413755772-.7752517350*I

Either the integral representation is not supposed to be valid everywhere, or Maple computes EllipticPi incorrectly.

z=(-1/(4*(-u+L)))(4*p^2*b^2*d-3*g*c*p^2)

given fixed values of u, L, and c, I would like to Maximiz Z(p, b) by finding best p and b, subject to 1-(2* d)/(p*(sqrt(g)+1))<=b<=1 and 0<=d<=L and Min(c,L)<=p<=u and1<=g<=4 

When I put "print(A=B=C);" in Maple 13 I get the error:

Error, `=` unexpected

about the second equality sign. How do I remedy that?
Thanks!

mapleatha

 

I input print(lambda*I) and I get I*lambda (Greek lambda symbol); Why is the order reversed?
Maple 13 (GUI) is doing it.
Thanks!

mapleatha

 I have in my Maple documents many good quality plots resulting from simulations. I need to export (or paste) them to templates of transactions in Word without loosing quality, and beeing flexible to some degree to fit the dimension.

Until now when I paste such plots the quality is lost and especially on descripltion on axes (vertical).

What I have to do? Do I need to go throuhg pdf format ? 

Seems to be when shading=none in fieldplot3d the plot returned is empty.  Is that a bug?

Hi everybody,

I use the Grid[Launch] function  (Windows 7, Maple 2015) to distribute many similar computations over all the processors my machine has.
 

Question 1

My machine is a 4 processors one (not hyperthreaded).
When it was equiped with Windows XP and I was using, let's say 2 proc., the performance manager showed that two processors among 4 were charged up to 95%-100% while the others remained around 0 %.
In this case (my problem is perfecly scalable), the elapsed time was exactly half it was when I used only one proc (and twice as large as the time obtained with 4 proc).


Now I'm working with Windows 7.
This behaviour puzzles me : if I use 2 procs among four and look to the performance manager, all the 4 procs are partially charged. It looks like Window 7 was distributing itself the computations ?
As a result (?), running on 4 proc no longer takes 25% of the elapsed time on 1 proc, but "only" 40%.
Could it be that some inner "dispatching task within processors" Windows 7 could have, might interfere with the distribution of tasks  Grid[Launch] does ?

Does anyone of you already had a same experience ?
If Windows 7 really has some "task managing procces", is it possible to switch it off ?


 

Question 2

Same context as previously.
I run the same code (search of a local maximum of a function where some of its parameters are randomly valued ; the sample of these parameters hase size 10000) over 4 proc.
On order to save intermediate results I wrote a loop within it I send blocks of 500 computations at the same time over the 4 proc.
This loop is executed 5 times (5*500*4 = 10000)

I observe that after each step of the loop the memory used is increased by a rather constant amount. It looks like if a 4 proc computation of 500 optimizations was costing N Mega Bytes, and that the memory was increased by N MB each times the loop is executed.
At the very end the computational time can dramatically slow down because of the amount of the memory used.

More precisely my pseudo code looks like this :
for step 1 to 5 do 
   Grid[Launch](MyCode, numnodes=4, imports=[BlockOf2000data], ...):  
   
# MyCode uses only one quarter of this 2000 data block depending on the processor number it runs on
end do:

Does it exist a way to clean the memory just before the "end do" command in order to avoid it to grow continuously ?


Any contribution will be highly appreciated.

The expression exp(2*t) gives us the number e^(2t). Can we get rid of the parentheses around 2t?
Thank you!

mapleatha

 

Hello,

I hope my question is not to general. I have a polynomial of 8th order

expression:=a8(z) * x^8 + .... + a1(z) * x + a0(z) = 0

on which I am using solve/RootOf

sol:=[solve(expression,x)]

Now when I plot it against z the solution has a jump, why?

When deriving the polynomial I could as well have used another variable instead of x above, say y. These two are related by a function...Then when I write down the 8th order polynomial in y and use RootOf/solve, then no jump occurs.

Is there a way to handle this because left of the jump the solution is not correct while right of it, it is...

First 914 915 916 917 918 919 920 Last Page 916 of 2428