dharr

Dr. David Harrington

8455 Reputation

22 Badges

21 years, 30 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

evalc puts things in th a+I*b form assuming all variables are real.

 

Edit: normal will then put things over a common denominator. You can then use evalc on the numerator if you want to pretty it up.

evalc.mw

The infinity norm is the maximum of the elements, so if you do this on the difference of your two vectors, you get what you want.

Download Norm.mw

 

If you leave the epsilon[i] quantities unspecified you can solve the equations in about 300 s on my machine, but the answer(s) has a length of 10350686, i.e., too complicated to work with unless you just want numerical values. Perhaps there is some structure to that...

In principle, you could the substitute the complicated epsilon[i] quantities into the answer, but that makes the whole thing even more complicated.

test2.mw

Edit: there is only one answer, but has(ans,RootOf) returns true, so there is likely not a fully analytical solution, and only a numerical solution is feasible.

I'm not a mac user so this might not apply, but a new worksheet and saved one are in different folders. So a full path instead of "/VLA/library/" might work.

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.

First 49 50 51 52 53 54 55 Last Page 51 of 83