dharr

Dr. David Harrington

8482 Reputation

22 Badges

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

The help page for this mentions this variation, and since it mentions the introduction of the maxroots option in Maple 15, it has probably been around since before then

You asked "What is name of the integration technique that Maple is using in the first step?". This is usually just called change of variables, or sometimes integration by substitution, see wikipedia.

Edit: Your worksheet has both epsilon and varepsilon; this is the main problem.

I only partially understand the geometry you want. I find it easier to work from more negative to more positive x values. Note that the piecewise conditions work like successive else-if clauses.

piecewise.mw

 

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.

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