Maple 2016 Questions and Posts

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

Dear Community,

I have a complicated function with two independent variables, namely QD( tD,  rD ). I would like to explore its behavior in a semilog plot in the range of tD = 1.0 .. 1000.0 with changing rDs, where I would like to change the values of rD with a slider of the Explore command. I've developed the attached code, yet it gives me an error message, "unexpected option... " Could you pls. have a look at it what do I do wrong?

Tx for the kind help in advance

best regards

Andras

 Explore_VEHQD.mw

Hello people in maple primes

I have a question, which is about the matrix shown in http://www.mapleprimes.com/questions/217852-HOW-I-Convert-Root-Of-In-To-Another-Common-Form

Why can't C below be shown with beta?

A := Matrix(3, 3, [[-a, a, 0], [0, 0, -sqrt(l*b*c*(j+k))/(j+k)], [2*j*sqrt(l*b*c*(j+k))/((j+k)*l), 2*k*sqrt(l*b*c*(j+k))/((j+k)*l), -c]]);
B:=subs(l*b*c*(j+k)=alpha,A);
C:=subs(j*alpha^(1/2) = beta,B);
e:=subs(alpha^(1/2) = gamma,B);

Best wishes.

taro

 

 

Dear Community,

 

I have difficulties evaluating a rather complicated infinite integral (see attachment). The result should be something like 12.319. Any idea how to go get this?

Tx for the kind help in advance,

best regards

Andras

Infinite_Integral_2.mw


Is anyone running the 2016.1a patch on ubuntu 16.04?

A fresh installation starts up and works, but after I install the patch the installation seems broken:

cd /usr/local/maple2016/bin
./maple
/usr/local/maple2016/bin.X86_64_LINUX/mserver: error while loading shared libraries: libicuucmpl.so.56: cannot open shared object file: No such file or directory
maple: could not start mserver

it looks like my installation does not have libicuucmpl.so.56. I can see these however:
./bin.X86_64_LINUX/libicuucmpl.so.49.1.1
./bin.X86_64_LINUX/libicuucmpl.so
./bin.X86_64_LINUX/libicuucmpl.so.49

running xmaple has maple open, then stay unresponsive.

Here is the upgrade file, i've been trying to use:
md5sum ./Maple2016.1LinuxX64Upgrade.run
7502caaa65cc623d5d2574823eee9343  ./Maple2016.1LinuxX64Upgrade.run


Has anyone else encountered this problem?
thanks

Hey everyone,

I'm using printf to print out the following:

printf("Absolute error = %.10f \nRelative error = %.10f", abs(fractionPart-binarySum), 100*abs(fractionPart-binarySum)/fractionPart)

however, it's tedious always having to edit the two occurrences of "10" decimal places. Is there a way to define a variable like decimals := 10 and then refer to it inside the quotation marks in printf?

Hello everybody!

Please help me to solve the attached partial differential equation. I am getting an error. I do have its analytical solution and that works fine.

The error is as follows
Error, (in pdsolve/numeric/plot) unable to compute solution for t>HFloat(0.0):
solution becomes undefined, problem may be ill posed or method may be ill suited to solution

The worksheet is attached hereshortsngle.mw

In feature "Procedures for two animations" posted by Kitonium appears this line, within a procedure.

T1:=(O2*~y+O1*~u)/~(y+u): T2:=(O3*~u+O2*~v)/~(u+v): T3:=(O4*~v+O3*~z)/~(v+z):

What is the meaning of "~y", for instance, and how does it differ from "y"?

I understand the conventional usage of ~ with a name in output to imply that that name is subject to an assumption.

I have been able to find nothing pertinent in the Maple Help information.  Please enlighten me.

Hi All,

When doing retart in a saved workbook get a no read access error link (see partial screen shot below). When the link is followed the message is there is no help for this error.

I am using Windows 10 64 bit and have full administrative prilvilages so I not sure what the problem is.

I have the same issue when I upload to the cloud.

In spite of message I can still do computations.

Any help in understanding this will be greatly appreciated.

Thanks,

 

Joe

 

Hi, I am new to the Maple.

I have been trying to figure out this question:

Find the numerical (decimal) value of

f (ln (5π) + 2e5 + √ 4 + sin (4) ) 

 Here is what I wrote:

>f := ln(5*Pi)+2*e^5+sqrt(4+sin(4));
f := ln(5*Pi)+2*e^5+sqrt(4+sin(4))
>evalf(%);
4.555055775+2.*e^5

I got "4.555055775+2.*e^5" as my answer which is correct. However, I would perfer to get a decimal number like "301.381..."

Could anybody show me how?

hi

how i can plot 4 curve in one graph in maple??

this data is given in excel format as below

thanks

16.3.xlsx

 

 

 

I have tried to solve a matrix with the function "LinearSolve" as seen in the picture, but instead of solving it just gives me back the operation i wrote (3). My which is to solve an equation system a quick as possible - have a templet fill in the matrix and press enter. I thought this "LinearSolve" function was the easiest way of doing. I know that I can right click and choose the function, but I want it as a command.

 

Any solutions on how to use the "LinearSolve" command to solve an equation system?

 

We assume that the radius of the outer stationary circle is  1. If we set the radius  x  of the inner stationary circle, all the other circles are uniquely determined by solving the system Sys.  Should be  x<=1/3 . If  x=1/3  then all the inner circles have a radius  1/3 . The following picture explains the meaning of symbols in the procedure Circles:

                                   

 

 

Circles:=proc(x)

local OO, O1, O2, O3, O4, O2x, O2y, O3x, O3y, OT, T1, T2, T3, s, t, dist, Sys, Sol, sol, y, u, v, z, C0, R0, P;

uses plottools, plots;

OO:=[0,0]: O1:=[x+y,0]: O2:=[O2x,O2y]: O3:=[O3x,O3y]: O4:=[-x-z,0]: OT:=[x+2*y-1,0]:

T1:=(O2*~y+O1*~u)/~(y+u): T2:=(O3*~u+O2*~v)/~(u+v): T3:=(O4*~v+O3*~z)/~(v+z):

solve({(T2-T1)[1]*(s-((T1+T2)/2)[1])+(T2-T1)[2]*(t-((T1+T2)/2)[2])=0, (T3-T2)[1]*(s-((T2+T3)/2)[1])+(T3-T2)[2]*(t-((T3+T2)/2)[2])=0}, {s,t}):

assign(%);

dist:=(A,B)->sqrt((B[1]-A[1])^2+(B[2]-A[2])^2):

Sys:={dist(O1,O2)^2=(y+u)^2, dist(OO,O2)^2=(x+u)^2, dist(O2,O3)^2=(u+v)^2, dist(OO,O3)^2=(x+v)^2, dist(O3,O4)^2=(z+v)^2, x+y+z=1, dist(O2,OT)^2=(1-u)^2, dist(O3,OT)^2=(1-v)^2};

Sol:=op~([allvalues([solve(Sys)])]);

sol:=select(i->is(eval(convert([y>0,u>0,v>0,z>0,O2y>0,x<=y,u<=y,v<=u,z<=v],`and`),i)), Sol)[];

assign(sol);

O1:=[x+y,0]: O2:=[O2x,O2y]: O3:=[O3x,O3y]: O4:=[-x-z,0]: OT:=[x+2*y-1,0]:

C0:=eval([s,t],sol);

R0:=eval(dist(T1,C0),sol):

P:=proc(phi)

local eq, r1, r, R, Ot, El, i, S, s, t, P1, P2;

uses plots,plottools;

eq:=1-dist([r*cos(s),r*sin(s)],OT)=r-x;

r1:=solve(eq,r);

r:=eval(r1,s=phi);

R[1]:=evalf(r-x);

Ot[1]:=evalf([r*cos(phi),r*sin(phi)]);

El:=plot([r1*cos(s),r1*sin(s),s=0..2*Pi],color="Green",thickness=3);

for i from 2 to 6 do

S:=[solve({1-dist(OT,[s,t])=dist(Ot[i-1],[s,t])-R[i-1], 1-dist(OT,[s,t])=dist(OO,[s,t])-x})];

P1:=eval([s,t],S[1]); P2:=eval([s,t],S[2]);

Ot[i]:=`if`(evalf(Ot[i-1][1]*P1[2]-Ot[i-1][2]*P1[1])>0,P1,P2);

R[i]:=dist(Ot[i],OO)-x;

od;

display(El,seq(disk(Ot[k],0.012),k=1..6),circle(C0,R0,color=gold,thickness=3),circle([x+2*y-1,0],1, color=blue,thickness=4), circle(OO,x, color=red,thickness=4), seq(circle(Ot[k],R[k], thickness=3),k=1..6), scaling=constrained, axes=none);

end proc:

animate(P,[phi], phi=0..Pi, frames=120);

end proc:  

 

Example of use (I got  x=0.22  just by measuring the ruler displayed original animation):

Circles(0.22);

                               

 

 

The curve on the following animation is an astroid (a special case of hypocycloid). See wiki for details. Hypocycloid procedure creates animation for any hypocycloid.  Parameters of the procedure: R is the radius of the outer circle, r is the radius of the inner circle.

Hypocycloid:=proc(R,r)

local A, B, f, g, F;

uses plots,plottools;

A:=circle(R,color=green,thickness=4):

B:=display(circle([R-r,0],r,color=red,thickness=4),line([R-r,0],[R,0],color=red,thickness=4)):

f:=t->plot([(R-r)*cos(s)+r*cos((R-r)/r*s),(R-r)*sin(s)-r*sin((R-r)/r*s),s=0..t],color=blue,thickness=4):

g:=t->rotate(rotate(B,-R/r*t,[R-r,0]),t):

F:=t->display(A,f(t),g(t),scaling=constrained):

animate(F,[t], t=0..2*Pi*denom(R/r), frames=90);

end proc:

 

Examples of use:

Hypocycloid(4,1); 

                                      

 

 

Hypocycloid(5,3);

                                      

 

 

 Круги.mw

HI there,

 

I have the following problem: I want to improve the runtime of my script (Maple 2016) and want to use multithreading/tasking.

First I have this script (let's start with an easy example):

>restart;
  with(LinearAlgebra): 
  with(Student[MultivariateCalculus]):
  with(plots):
  with(Statistics):
  with(Threads):
  with(RealDomain): #I know, I don't need all of that here

>cdf := x-> int(PDF(GammaDistribution(4.5/100,2.5),xi-0.068),xi=0.068..x):
>N:= 20:
>sample := (i) -> solve( (1/(2*(N+1))+1/(N+1)*i)=cdf(x),x): #this is an equidistant sampling

> smpl := [Seq(sample(i),i=1..(N-1))]; #I try to run a multithread seq -> got it from the documentation

   Error, (in assuming) when calling 'Engine:-Process'. Received: 'type `System` does not exist'

I get this error message, but I don't really know what to do with it. I googled and searched, but I couldn't find useful help. Note that when I run this command, I still use only one processor (at least until it returns the error). I also tried:

>smpl := Map(sample,sample_dists);>N:= 20:
   Error, (in assuming) when calling 'Engine:-Process'. Received: 'type `System` does not exist'

I also tried to implement it with threads:

> cont := proc()
      global mutex_sample, smpl:
      smpl := [op(smpl), _passed]: #add the results of the tasks to the smpl var.
      print("Sampling Done");
   end proc:

> sample := proc(cdf, min, max, N) #samle the region
      local output:
      seq(solve(,x),i=0..(N-1)); #return value
   end proc:

> startSampling := proc()
      local sampling_tasks,i:

      print("Starting Sampling!");
      sampling_tasks := []:
      for i from 1 to kernelopts(numcpus) do #for each processor
          sampling_tasks := [op(sampling_tasks), Task=[sample, cdf, i/(kernelopts(numcpus)+1),(i+1)/(kernelopts(numcpus)+1),ceil(N/kernelopts(numcpus))]]; #sample a region
      end do:

      print("Starting Sampling Tasks!");
      Threads:-Task:-Continue( cont, op(sampling_tasks)); #start sampling threads
      print("Sampling Tasks started!");
   end proc:

> Threads:-Task:-Start( startSampling ); #start everything

"Starting Sampling!"
"Starting Sampling Tasks!"
"Sampling Tasks started!"
Error, (in assuming) when calling 'Engine:-Process'. Received: 'type `System` does not exist'

 I know I'm doing here something systematically wrong, but I can't figure it out.

I would be very greatful, for your help or insiged.  

 

EDIT: 
1) The presented script might doesn't make sense (or might be pointless), because I have a much larger and more complex (model) in my original script. But, my script didn't work (exactly same error). So, I tried this simple example, to figure out what the problem is. But it didn't work either. I thought, it might be better (didactically) to find the problem in the simple code. It might be easier to explain in a forum and easier to analyse. (SO I could then see why my more complex code is not working).

2) I was running the script in Linux (Ubuntu 16.04 x64) and it produced this error. I also run the script in Windows 10.2 where I got the same error (and sometimes I got an "Maple Kernel cannot be reached" message where I had to restart Maple.

3) I noticed that solve sometimes returns a complex solution (usually it returned: "value + 0.0 I"). I therefore added "with(RealDomain): ", which had the consequence that some sample points were "NULL". I know that, and that is another issue, which I'm not bothered about (right now).

SOLUTION: (most likely)
Thanks to everyone who replied. But Carl_Love probably is right by pointing out that int, solve, fsolve ... are not thread-safe and therefore caused the crahses/error messages, while calling thesefunctions in different threads.

Does anyone know what the default function is for the pre-subscript and pre-superscript?  I would like to use them for a variable name to represent the local reference frame and global reference frame in my multibody calculations.  Thanks

First 46 47 48 49 50 51 52 Last Page 48 of 60