Maple 2016 Questions and Posts

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

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

Hello people in mapleprimes,

I have a question:
What are you doing when you use maple in calculating, for example, your paper,
to avoid missing, for example, variables you use, or for your needs to look back the outcomes you obtained before?
If this is a paper-using work, on considering what to do next, you will read some pieces of papers you wrote and
on which you had calculated and obtained necessary equations. But, with small monitor 13 inch, and with
inconvenience of dealing with things in PC, compared with papers, I feel some stress in using maple in writing a paper.
So, now, I am asking you what kind of methods you has devised to make what you are writing compact and easy,
for you to handle with what you are writing.

I know surely that there are the document block, which enables output or input to not be shown, the workbook,
which is helpful in putting attached worksheets or jpg files together at one workbook, and the distinction of ":" and ";",
which in the case of the former, hides expressions in the outcome.

But, yet, I want to ask you about the ways you use to make it easy to write something.
If you have some, I will be very glad if you show it here.

Best wishes.

taro

 

 

 

 

 

 

Hello everybody!
I have a PDE with initial and boundary conditions. I want to plot its solution by taking "t" as x axis. I have seen the documentation. It only has the space variable on x axis. Please show me a way to achieve what I intend.

here is the file pdsolve.mw

The value of x can be chosen as 0.16 or 0.21

I am trying to solve a PDE using pdsolve-numeric. I am getting an error related to boundary conditions.
Please see the follwing worksheet and suggest me some solutions

pdsolve.mw

When I copy mathml into Maple it always pasted the subscipts as indexed.  How could I quickly convert the indexed subscripts into literal subscripts without having to right click and convert each variable?

How to prove or disprove the flatness of the surface x = (u-v)^2, y =  u^2-3*v^2, z = (1/2)*v*(u-2*v), where u and v are real-valued parameters? Here is my try:

 

plot3d([(u-v)^2, u^2-3*v^2, (1/2)*v*(u-2*v)], u = -1 .. 1, v = -1 .. 1, axes = frame);plot3d([(u-v)^2, u^2-3*v^2, (1/2)*v*(u-2*v)], u = -1 .. 1, v = -1 .. 1, axes = frame)

 

eliminate([x = (u-v)^2, y = u^2-3*v^2, z = (1/2)*v*(u-2*v)], [u, v])

[{u = -2*(-x+2*z+(x^2-8*x*z)^(1/2))/(-2*(x^2-8*x*z)^(1/2)+2*x-8*z)^(1/2), v = (1/2)*(-2*(x^2-8*x*z)^(1/2)+2*x-8*z)^(1/2)}, {-(x^2-8*x*z)^(1/2)*x+y*(x^2-8*x*z)^(1/2)-4*(x^2-8*x*z)^(1/2)*z+x^2-y*x+4*y*z-16*z^2}], [{u = 2*(-x+2*z+(x^2-8*x*z)^(1/2))/(-2*(x^2-8*x*z)^(1/2)+2*x-8*z)^(1/2), v = -(1/2)*(-2*(x^2-8*x*z)^(1/2)+2*x-8*z)^(1/2)}, {-(x^2-8*x*z)^(1/2)*x+y*(x^2-8*x*z)^(1/2)-4*(x^2-8*x*z)^(1/2)*z+x^2-y*x+4*y*z-16*z^2}], [{u = -2*(x-2*z+(x^2-8*x*z)^(1/2))/(2*(x^2-8*x*z)^(1/2)+2*x-8*z)^(1/2), v = -(1/2)*(2*(x^2-8*x*z)^(1/2)+2*x-8*z)^(1/2)}, {(x^2-8*x*z)^(1/2)*x-y*(x^2-8*x*z)^(1/2)+4*(x^2-8*x*z)^(1/2)*z+x^2-y*x+4*y*z-16*z^2}], [{u = 2*(x-2*z+(x^2-8*x*z)^(1/2))/(2*(x^2-8*x*z)^(1/2)+2*x-8*z)^(1/2), v = (1/2)*(2*(x^2-8*x*z)^(1/2)+2*x-8*z)^(1/2)}, {(x^2-8*x*z)^(1/2)*x-y*(x^2-8*x*z)^(1/2)+4*(x^2-8*x*z)^(1/2)*z+x^2-y*x+4*y*z-16*z^2}]

(1)

NULL

I think Gaussian curvature should be used to this end. Dr. Robert J. Lopez is my hope.

Download flat.mw

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