dharr

Dr. David Harrington

8240 Reputation

22 Badges

20 years, 344 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are answers submitted by dharr

You probably know this already, but if you translate the problem to run from x=0 to x=L, then dsolve directly gives all the solutions, where they are all sine functions.

PIB.mw

The missing half of the solutions from eq (8), {A=0, B=B, k=Pi*(1+2*_Z1)/L}, are the cosine solutions that the parametric solver finds. The parametric solver only deals with polynomial equations, so I think it is treating cos(k*L/2) as a single variable. Then you had to use solve to get the k values. 

The "bug" is that solve didn't find these cosine solutions when allsolutions is specified. The help for allsolutions says "Return more solutions for non-algebraic equations" [my bold], so I think it was using a different algorithm, and did not view it as a two-step problem: polynonial solve while freezing cos(k*L/2) and sin(k*L/2), and then solving these for k.

Not really sure what you want, even after your answer to @Joe Riel. Look at the help for workbook - it can hold multiple worksheets and other sorts of data.

I think since Colours is not an export of the module, it can only be accessed by a procedure (export of) the module. A simple example is attached.

Edit: kernelopts(opaquemodules=false) can override this behaviour

module.mw

The (corrected) line below was missing the first "eval"

printf("%7.3f%22.10f%20.10f%17.3g\n", 
		h*c,res[8],eval(exy,[x=c*h]),abs(res[8]-eval(exy,[x=c*h]))):

Now it produces some sensible looking output.

There is nothing wrong here; Maple's guess at what is simpler varies a bit. In my version (Maple 2017) the last one doesn't simplify to 1. However, simplify(rationalize(f(-2)) gives the simple answer (1/2)*sqrt(5)+1/2 that you expect for the first one. I'm frustrated over the second one though...

For the inner integral, at least for the case of n=0 (I didn't try n=1), the speed improves by a factor of about 2 by replacing hypergeom by Hypergeom (going directly to numerical evaluation).

Hypergeom.mw

 

The Tools -> Options menu can change defaults.

Under the Display tab choose Input Display: Maple Notation; Output Display: 2D math notation.

Under the Interface tab choose Default format for new worksheets as worksheet, and Default zoom there changes the font size.

solve({p||(1..5)}, {vars})

correctly sets up a system of equations but does not return a solution, so then Cc cannot be produced.

@Kitonum's solution offers the ultimate in flexibilty, but just linking the points with line segments is the default for plot given a list of points.

Points:=[[1,1],[1,3],[2,2],[3,3],[3,1]]:
plot(Points);

Using style=pointline shows points and lines, and options can be used, but not two colours

plot(Points,style=pointline,color=red,symbol=solidcircle, symbolsize=20,thickness=2);

In Maple 2017, HINT=`*` returns the solution you want among others (though rerunning sometimes gave a different answer). Several answers check out OK with pdetest, but perhaps not all well behaved at the origin. Need another bc/boundedness to make unique?

Download pdsolve2.mw

Maple's numerical solver for partial differential equations does not handle domains of arbitrary shape, such as your aerofoil. There are commercial FEM solvers for such problems, e.g., COMSOL, or open source versions, e.g., freefem.org. Perhaps Maplesim can do this; I'm not sure.

[fsolve(eq,x=-50..150,maxsols=50)];nops(%);

gives 27 solutions.

You could also find them with RootFinding:-NextZero in a loop.

fsolve.mw

I just did this by manually adjusting F''(0) to get a good approximate solution and then used it to solve the boundary value problem. If you play around with F''(0) you will see the solution is very sensitive - it makes an automated shooting method hard to do. It seems harder for inf=20 than inf=10. I think the whole idea of a numerical approximation for eta=infinity when F also goes to infinity makes this method unworkable/inaccurate. I'm guessing a better way would be to pose the problem in terms of G=F', which doesn't go to infinity, and transform the eta variable to run fron 0..1.

zip file contains Fig5.prn, Fig6.prn

Figs.zip

Download Mahapatra2.mw

 

 

see ?discont for the help page with examples - in your more complicated case it gives only a RootOf expression, so you would need to work further, e.g., fsolve, to get numerical values in a range. For the simple floor(x) case, it returns _Z1~, meaning all integers.

restart;
ST:= StringTools:
foo := proc(s) ST:-UpperCase(s); end proc;

            foo := proc (s) ST:-UpperCase(s) end proc

foo("a");
 
            "A"

 

First 48 49 50 51 52 53 54 Last Page 50 of 81