dharr

Dr. David Harrington

9112 Reputation

22 Badges

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

@chty_syq  You have several different "1+2" in this document, but only some are active. On the toolbar  "2D input" indicates that it looks nice but isn't active and "2D math" means that it is also active. "Maple input" means it is active but you are entering it in "1D" or command input style. You also want math rather than text on the line above.

If you open a new worksheet (rather than document) then enter 2-D math at the prompt, and press enter, the answer will appear and a new prompt for another math input, which is probably the easiest way to use Maple for math unless you want very sophisticated fomatting.

The Maple applications centre has a worksheet to download that calculates 3j symbols:

https://www.maplesoft.com/applications/view.aspx?SID=4896

If you want to get the cos form, then

int(tan(2*x),x);
convert(%,cos);
simplify(%,symbolic);

gives -(1/2)*ln(cos(2*x))

For example, to find up to 10 roots in the range -2..5, use

fsolve(eq,beta=-2..5,maxsols=10);

You can just differentiate the procedure that produces Tf(x,y):

Tfnum:=rhs(op(3,pp));  # a procedure of y only

DTfnum:=D(Tfnum);

A fascinating capability of Maple.

DiffTf.mw

 

 

numSol, the output of dsolve can be used to get the numerical values out - try numSol(0.1). So extracting the values can be done something like this (depends on how exactly you want it formatted.

for tt from 0.1 to 0.9 by 0.1 do
  map(rhs,numSol(tt)[1..2])[];
end do;

Suggest you change ltatble to ltable...

I've only ever used the startup code edit region, so hadn't noticed the deficiency you mention in your last point. When executing the startup code edit region with the "!" icon, the cursor position near the error is indicated by a very-hard-to-see red wavy underline as in the screenshot below (but you don't get told what the syntax error is)

Don't have Maple 18, but I don't think it should be different.


 

s:=[f(x) , exp(a), GAMMA(2*x)-1 , infinity , 1, -infinity];
remove(has,%,infinity);

[f(x), exp(a), GAMMA(2*x)-1, infinity, 1, -infinity]

[f(x), exp(a), GAMMA(2*x)-1, 1]

 


 

Download removeinf.mw

Your worksheet is quite complicated, so maybe you can give some more information about the matrix or provide a simpler example. In particular, are all the entries numeric? is it sparse? Without that information, I can make only the general suggestion

You want FF3 = FF2^(-1).FF1

In general, finding the matrix inverse is bad practice here - you should just solve FF2.FF3=FF1 for the unknown matrix FF3.

Just call LinearSolve with A=FF2 and B=FF1:

FF3 := LinearAlgebra:-LinearSolve(FF2,FF1);

Things will be slow for Digits=30. If you can use Digits less than evalhf(Digits) (usually 15), then the numerical computations will be done in hardware and will be much faster.

Since a=a means any a is acceptable, and you want a>0, then a=a,b=0,c=0 and d=d is not a solution. But any d is OK, so I think a>0,b=0,c=0,d=d is a missing solution.


 

restart;

eqns:=[a>0,b*d*(abs(c)^2-abs(a)^2) = 0, -a*c*(abs(b)^2-abs(d)^2) = 0, -abs(b)^2*a*d+abs(d)^2*b*c = 0, abs(c)^2*a*d-abs(a)^2*b*c = 0];

[0 < a, b*d*(abs(c)^2-abs(a)^2) = 0, -a*c*(abs(b)^2-abs(d)^2) = 0, -abs(b)^2*a*d+abs(d)^2*b*c = 0, abs(c)^2*a*d-abs(a)^2*b*c = 0]

solve(eqns, {a, b, c, d});

{b = 0, c = 0, d = 0, 0 < a}, {b = 0, c = a, d = 0, 0 < a}, {b = d, c = a, 0 < a, 0 < d}, {b = 0, c = -a, d = 0, 0 < a}, {b = -d, c = -a, 0 < a, d < 0}, {b = d, c = a, 0 < a, d < 0}, {b = -d, c = -a, 0 < a, 0 < d}

eval(eqns,{b=0,c=0});

[0 < a, 0 = 0, 0 = 0, 0 = 0, 0 = 0]

 


 

Download ineq.mw

There is only one value for each element. According to ?ScientificConstants,properties, "for those elements with several solid forms, the density is of the most stable crystal form". This is the usual convention for thermodynamic tables, where the most stable allotrope is the standard form (one with the enthalpy of formation defined as zero). The exception is phosphorus, where white phosphorus is the standard form, even though red phosphorus is more stable (because the red phosphorus structure is not well defined). In Maple too, the phosphorus density given is that for white phosphorus (in contrast to the help statement).

nops of a Vector is always 3 - you want numelems here.

As in the help page, Maple outputs the normal form without the D. As per the Wikipedia page, the D can be found from L by taking the squares of the diagonal entries. Following the prescription there, if L is the matrix from Maple's output:

S := DiagonalMatrix([seq(L[i, i], i = 1 .. Dimension(L)[1])]);

D:=S^2;

New L:

Lnew:=L.S^(-1);

 

 

First 71 72 73 74 75 76 77 Last Page 73 of 87