dharr

Dr. David Harrington

2403 Reputation

15 Badges

17 years, 146 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 professor of chemistry at the University of Victoria, BC, Canada, where 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

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"

 

Can reproduce the table 1 values. For table 2, the skin friction corresponds to the second solution but the fig 5 plot corresponds to the first solution, so something in the paper seems wrong. But the secret is to supply some approximate solutions that look like the solution you want.

Download ode.mw

To successively apply functions, use function composition with @. So expand@conjugate@i_ does your i_, then  conjugate, then expand. Edit: function multiplication at #2 now works

composition2.mw

Since the 19.58480220 is recognizable as having units of V^(-1), Vt must be in Volts, and so you want Vt from 0 to 0.0257 V. So you can solve for t and then use a parametric plot.

[Worksheet not displaying right now]

Download Vt.mw

2 3 4 5 6 7 8 Last Page 4 of 35