Maple 7 Questions and Posts

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



Dear Colleagues,
Please give advice - How correct in Maple can be solve the heat nonlinear equation system with perfect thermal contact conditions?

Using procedure dsolve (numeric) Maple cannot determine type of problem (initial or boundary).

initial/boundary conditions specified at too many points 1
Error, (in dsolve/numeric/type_check) cannot determine type of problem (initial or boundary), as conditions are given at 4 points

In attachment Maple file - numeric.

Maybe anyone can get a simple exaple of the maple code for numeric solution of this  task?





k1:=5; k2:=7;k3:=8; Q:=4;p:=0.001;l:=0.1; d:=0.6;

k1 := 5

k2 := 7

k3 := 8

Q := 4

p := 0.1e-2

l := .1

d := .6




Eq1 := 25*(diff(T1(x), `$`(x, 2))) = 0



Eq2 := 49*(diff(T2(x), `$`(x, 2))) = -4*Dirac(x)+T2(x)^4



Eq3 := 64*(diff(T3(x), `$`(x, 2))) = 0


con1:=T1(0)=T2(0);con2:=T3(p)=T2(p); con3:=k1*(D(T1)(0))=Q-k2*(D(T2)(0)); con4:=k2*(D(T2)(p))=k3*(D(T3)(p)); con5:= T3(l)=300; con6:=T1(-d)=300;

con1 := T1(0) = T2(0)

con2 := T3(0.1e-2) = T2(0.1e-2)

con3 := 5*(D(T1))(0) = 4-7*(D(T2))(0)

con4 := 7*(D(T2))(0.1e-2) = 8*(D(T3))(0.1e-2)

con5 := T3(.1) = 300

con6 := T1(-.6) = 300


nsol:=dsolve({Eq1, Eq2, Eq3,con1,con2,con3,con4,con5,con6},{T1(x),T2(x),T3(x)}, numeric,bvp);



initial/boundary conditions specified at too many points 1

Error, (in dsolve/numeric/type_check) cannot determine type of problem (initial or boundary), as conditions are given at 4 points






Download numeric.mws

The plots at the end of the following code output the lines when the textplot is absent - but with the textplot the lines are omitted.  Am puzzled as to why this is happening.  Square_areas.mws  Square_areas.txt

Any help gratefully received.  David


 # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 # Areas of portions of a square 
 # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 # Pick a point in the square: say (x1, y1)
 lin[1]:=line([side/2,0],[x1,y1], color=black):
 lin[2]:=line([0,side/2],cpoin, color=black):
 lin[3]:=line([side/2,side],cpoin, color=black):
 lin[4]:=line([side,side/2],cpoin, color=black):
 squ:= polygon([[0,0], [0,side], [side,side],[side,0]], color=white):
 # Plot without tetA - Lines are given
 plots[display]({seq(lin[i],i=1..4),squ,poinC}, scaling=constrained,axes=normal);
 # Plot with tetA - Lines are not given
 plots[display]({seq(lin[i],i=1..4),squ,tetA,poinC}, scaling=constrained,axes=normal);
 # Plot with tetA (placed  differently) - Lines are not given
 plots[display]({squ,poinC,tetA,lin[1],lin[2],lin[3],lin[4]}, scaling=constrained,axes=normal);



I'm trying to solve two simultaneous equations for velocity, V, and angle of inclination, alfa, given the range, ranj and maximum height, H.  The solve part works fine, but gives me several unwanted complex solutions.  I was trying to put the solutions in a list so that I could access them.  The text below is rather verbose, but I've left comments in as a possible educational aid for people understanding expression sequences, and sets. 

#interface(imaginaryunit, errorbreak=0, errorcursor=true, #labelling=false):

# Investigating sets and expression sequences
#S:={q, w,e}:
L4:=convert(S,list): #Doesn't work for expression sequences
L4:=[S]; # this converts the expression sequence to a list, L4
L4[3]; # outputs 3rd element of L4 which is 5
# End of investigation

print(`Next part - solving two equations: Ranj and height H given`);
print(`To find angle of inclination, alfa, and velocity, V`);
L:=solve({4*V^2*cos(alfa)^2-g*Ranj^2/(Ranj*tan(alfa)-2*H), Ranj*g-V*sin(2*alfa)},{V, alfa}): #::real}):
#L:=solve([4*V^2*cos(alfa)^2-g*Ranj^2/(Ranj*tan(alfa)-2*H), #Ranj*g-V*sin(2*alfa)],{V, alfa}): #::real}):
# ::real, alfa::real:
printf("L is of type %a", whattype(L));
#L2:=convert(L,list); #gives error message
print(`Next: To distinguish between real and complex solutions`);
print(`Output in if statement is not working as expected.`);
for i from 1 to nops([L]) do
if type(L[i],complex(float)) then
#if type(L[i],nonreal) then
printf("Complex solution for i=%d\n",i);
printf("else part of if: i=%d\n",i);
print( L[i]);
end if;
end do; #for

Download solve_V_alfa.txt



Attached is code in Maple 7 and a text file.There is a for loop in which I want the plots to be output, and the printf command - but I am not getting a plot at all.  Any advice most appreciated.  David


Attached are two similar files: one written in Maple 7 code, and a similar text file.

    My original intention was to have the two dimensional letter M do an animated "knees up" in just one color.  However the program works - but not as I intended.  The individual four sections danced around - and I thought it was rather novel - but decided to make each one a different color - red, blue, white and turquoise.  I was surprised to find the polygons were all the same turquise color - that of the fourth polygon.   Is there an easy fix, or must I write four separate procs for the four polygons?

Thanks in advance for any advice.  David 


  I am trying to solve a 5x5 crossword  puzzle, where one must find 5 across clues, and 5 down clues - all in a 5x5 square grid.  I have done a dictionary search for all the possibilities of the ten clues.  (For brevity this is not in the attached program.)  These possible solutions have been put as lists.  The attached Maple 7 program attempts to solve the crossword by a series of nested for loops, checking if the intersection of across and down clue letters match.  In this the use of nops is made, as the number of possible words for each clue varies.  I appreciate why the program fails, but am at a loss for a "work around", and fear a complete restart may be needed. 

   I attach two files of the program.  The Fivebyfive_crossword.mws Maple 7 file includes a graphic grid of the crossword, with asterisks (*)  for unknown letters.  The corresponding .txt file probably will not have that.  Sadly, Maple doesn't allow the upload of .rtf files.  Further documentation is in the program.

   Any comments, help would be most appreciated.

I am in the process of rewriting a long program so that it invokes procs.  After each proc I write I want to test the proc, so am not interested in any further output.  So in the code I entered `quit` (12);  - which I obtained from the Maple 7 Help documentation.  ...and possibly for good measure:  done;   The system crashed and I had to start again.   I have looked on the MaplePrimes documentation.  There are a couple of posts which treat this as an amusement.  eg

subs(_=sscanf(D,%m)[],proc() _end)();   which I haven't been game to try yet.

  I am curious about the number 12.  In the Maple 7 documentation the output is meant to give some useful information regards bytes used, allocation, & time taken.  Maple 7 documentation says that the number between parentheses should be an nteger in the  range 0..255.  Does varying this number make any difference?

WARNING!  Running the following program could crash your system.  Save any work before trying it.

restart:  `quit` (12);

   I'm curious to know what that does on later versions.  I'm running Maple 7 on Windows 7, so I suspect some incompatibility.

Any comments, advice gratefully received.  David

Invalid arguments error message in the program below.  Advice please on why this is not working.

#Set notation brackets - ignores this
#solve({tan(x)=2*(h-depth-y)/w, z=w*cos(A)+w*sin(A)/tan(A+x), uY+z+depth=h},{x, y,z});
solve(tan(x)=2*(h-depth-y)/w, z=w*cos(A)+w*sin(A)/tan(A+x), uY+z+depth=h,{x, y,z});

Error, (in solve) invalid arguments




Download solve_equation.mws


I am trying to change (morph) the capital letter Yinto the shape of an American football goalpost -which has a sigle post , and the top part looks like the top part of the letter H.  The attached program is attempting to morph just three points - two of which, A, and D stay the same and the middle point Mo is meant to change from being on the line AD, to progressively change to be part of a right angle triangle.  Eventually I want to use more points - but am making heavy weather of this.  Any helpwould be appreciated. 


The two attached programs are such that the "kaput" version uses a procedure to draw the letter V, with the option of a flat top or pointed top.  The last parameter, s, takes on values "p" or "f" for pointed or flat respectively. - but I get error messages.  The Letter_V_working programdoes not use a proc, but works.  Where is the error?

  Thanks in advance for any help.

   .  .


The attached program is of a point moving along a conical path of a cone, then doing a descent back to the start.   For values R=60, r=20, h=10 the animation seems to work reasonably well.  However when r=19 - only a small change - the development plot of the cone is only partially shown?   Also, I have some variables nameP1, nameP2 which I would like to alter the color of.  Howdo I do this?

  Any comments or help most appreciated. 

# About twenty years ago Joe Riel posted 

#printing_just_for_fun.mws   by Joe Riel 30-6-‘98

#As part of this he had:



print(cat(`Does `,d_string,` = `));

#Is it possible to put the eta symbol on the same line?

#   Yes,  …but without the comma??  And…
 printf("Does %s = %a\n",d_string, eta);

#  does not give the Greek letter eta, but just eta,  while


#...both give the Greek letter

#  Is it possible to use printf (or similar?) to obtain output 

#  of:  Does D*e*v*o*u*r*e*r = h  

#  Oops!  In Word the h was a Greek letter eta!

#  ...and lastly, can it be done in Maple 7?


Am in the process of trying to addsome animation to a 2D letter R, namely to make the 'stalk' move.  I lost the output and managed to retrieve it by adding  verboseproc=0, and printlevel:=5.  However printlevel:=5 gives an excessive amount of output and anything less than 5 doesn't give enough output.  The code is messy asI've been experimenting with general curve fitting.

   Any help gratefully received. 


Splines and BSplines etc for curve fitting.

The attached short program uses with(CurveFitting) and BS:=BSpline(2,x);  outputs four expressions, the third being 

2-x, x<2.  I'd like to be able to access this, and plot it. but plots[display](BS[3], x=1..2); comes up with an error message.

Thanks in advance for any help. 


Am trying to learn about commands in Maple 7 I have not come across before - namely cutin, cutout and project.  Am I correct in thinking these commands are for use in three dimensions, and won't work in two dimensions?  Examples in the Help section seem to be confined to 3D.

  In the attached program I created a triangle (triag)using the polygon feature, then used project(triag, [[0,0.5],[2,2]]) to see what the resultant plot would be.  It was a line segment with length of the triangle - as if it was the shadow of the triangle.  Am I right in thinking a 3D object would give a 2D shape using this project command?

Thanks, David 

1 2 3 4 Page 1 of 4