Maple 18 Questions and Posts

These are Posts and Questions associated with the product, Maple 18

Hi everyone,

 

I am exploring the physics package a bit. However, in the documentation I didn't find anything about how to setup operator-ket relations like:

A | l,m,n > = f(l,m,n) | g(l,m,n), h(l,m,n), z(l,m,n) >

The Creation and Annihilation operators were the only predefined ones I found.

 

Cheers

NOh

My instructor gave me the problem lim as x goes to 0 of ((2 + x)^3 +8)/x I can't figure out how to get the lim as x goes to, to show up.  There is no button for it in the expressions pallette like there is for things like the piecewise function. My instructor won't help me.  Is there a basic guide I can buy or something.  This software isn't very intuitive. 

The installation / activation went without trouble. The problem occurs when I want to start Maple. The splash screen shows up with a blue loading bar and that's it. It just keeps loading, sometimes it gets to the end but nothing more. Taskmanager shows a CPU usage of +/- 15%. I searched the net for answers but I only found two similar situations. One was due to the java heap size and another one due to tcp/ip problems. I checked both but the problem still persists. I really need Maple for my courses and you guys are my last resort. I'm running it on win7 64bit and I tried both 32 and 64bit Maple.

Hi, 

I'm trying to set up the dirac algebra using the Physics package in maple 18. There are dirac gamma matricies (Dgamma) already specified, but I can't seem to manipulate their commutation relations. 

So I've tried building my own: 

restart;
with(Physics);

Setup(noncommutativeprefix = {gamma});

g[1] := gamma[1]; g[2] := gamma[2]; g[3] := gamma[3]; g[4] := gamma[0];

InverseMetric := rhs(g_[`~mu`, `~nu`, matrix])

Algebra :=  (a, b) -> %AntiCommutator(g[a], g[b]) = 2*InverseMetric[a, b];

Rules := Matrix(4, 4, Algebra);

Setup(algebrarules = Rules);

Error, (in Physics:-Setup) unable to set AntiCommutator(gamma[0], gamma[1]) = 0 because, taking into account {AntiCommutator(gamma[0], gamma[0]) = 2}, we would have gamma[0] and gamma[0] anticommutative and AntiCommutator(gamma[0], gamma[0]) <> 0

It seems like Maple can't handle the Dirac Algebra? Or have I done something obviously wrong?

Any help is appreciated. 

Thanks

Hi,

I use Maple on my laptop computer (windows 8.1) with a small screen. My problem is that the text in the menus, palettes, plots etc. are so small so I can´t read it. I have set Large toolbar icons under the menu tools-options-interface and I use the zoom buttom on the toolbar but this only magnify the text in a document. I also use the magnifying glass in windows, but I find it very inflexible. Is there any better solution to this problem?

Kind Regards

Leif Jonson

Below is the function that I have.

 

f := (t-1)^(1/3)

p:=2;

b[n] := 2/p*(Int(f*sin(2*Pi*n*t/p), t = 0 .. p))

 

I also included a picture below to show what it is doing. Some help would be greatly appreciated. All I need to know is why maple doesn't want to evaluate bn?

 

Maple Code

 

So if I have a procedure like 

with(GraphTheory)

tneighbors := proc (G::Graph)

local numvertices::integer, i::integer, currentvertex;

numvertices := nops(Vertices(G));

for i to numvertices do

currentvertex := Vertices(G)[i];

if nops(Neighbors(G, currentvertex)) = 2 then print(currentvertex)

end if;

end do;

end proc;

How do I make it so the output gets returned as a set?

For example, if I do  twoneighbors(G); and get
1

7

4

How do I make it so the output is listed as a set like {1,4,7}? Thanks.

Hi Maple friends.

How can I find the domain of y=sqrt(3*x-5)? or of y=1/(x+2)^2?

Thanks in advance.

When I open my file I got an error message says "there were problems during loading process"

and some of my text are missing.

Maple Worksheet - Error

Download quant_hw_5.mwquant_hw_5.mw

Download quant_hw_5.mw

Can anyone help me,please

See AAAA.mw

The alpha and beta are 'randomly' chosen, both >0, to produce some values, hence a value for the target function to optimize.

I am having trouble to evaluate the expression in the middle of the calculation.

Sometimes, the 'chosen' alpha and beta works fine with 'method = _d01amc' for numerical integration. and such way is really "fast".

 

But sometimes, the the 'chosen' alpha and beta will fail. Even when both of them are perfectly defined. and the integral can be easily evaluated using Int() and then evalf().

 

So what's be best way to proceed?

Thanks,

casperyc

Consider the following sum:


We know that if k is between 1 and N, the result will be



and otherwise the sum is zero.

How can I tell maple to compute this sum in each case without giving numerical values to the parameters "N" and "k"?

Thanks. :)

If I were to evaluate a single numerical integral, I can use evalf( Int(,method = _d01amc)).

But when the expression say is created by a built in function, Student[VectorCalculus][Hessian], from a complicated expression involve integrals. The resulting expression does not have the option "method = _d01amc". It then takes a long time to evaluate.

See this "HE" variable for example. HE.txt

value(HE); # takes a long time

evalf(HE); # takes a long time

 

Is there a way to evaluate "HE", using ",method = _d01amc" wherever necessary?

 

Thanks!

This application calculates the number of photons reaching a camera sensor for a given exposure. A blackbody model of the sun is generated. The "Sunny 16" rule for exposure is demonstrated. Calculations are done using units.Photon_Exposure_Array.mw

Photon ExposureNULLNULL

Blackbody Model of the Sun

    h := Units:-Standard:-`*`(Units:-Standard:-`*`(0.6626069e-33, Units:-Standard:-`^`(Unit('m'), 2)), Units:-Standard:-`*`(Unit('kg'), Units:-Standard:-`/`(Unit('s')))): 

Plank Constant       

  kb := Units:-Standard:-`*`(Units:-Standard:-`*`(0.1380650e-22, Units:-Standard:-`*`(Units:-Standard:-`^`(Unit('m'), 2), Units:-Standard:-`/`(Units:-Standard:-`^`(Unit('s'), 2)))), Units:-Standard:-`*`(Unit('kg'), Units:-Standard:-`/`(Unit('K')))): 

Boltzman Constant  

c := Units:-Standard:-`*`(0.2997925e9, Units:-Standard:-`*`(Unit('m'), Units:-Standard:-`/`(Unit('s')))):  ``

Light Speed

Rsun := Units:-Standard:-`*`(Units:-Standard:-`*`(6.955, Units:-Standard:-`^`(10, 8)), Unit('m')): ``

Sun Radius  

Re_orb := Units:-Standard:-`*`(Units:-Standard:-`*`(1.496, Units:-Standard:-`^`(10, 11)), Unit('m')): ``

Earth Orbit

Tsun := Units:-Standard:-`*`(5800, Unit('K')): ``

Sun Color Temperature     

 tf_atm := .718: 

Transmission Factor  

 

Sun: Spectral Radiant Exitance to Earth: Spectral Irradiance                   

  "M(lambda):=(2*Pi*h*c^(2))/((lambda)^(5))*1/((e)^((h*c)/(lambda*kb*Tsun))-1)*(Rsun/(Re_orb))^(2)*tf_atm:" NULL

evalf(M(Units:-Standard:-`*`(555, Unit('nm')))) = 1277414308.*Units:-Unit(('kg')/(('m')*('s')^3))"(->)"1.277414308*Units:-Unit(('W')/(('nm')*('m')^2))NULL

Photopic Relative Response VP vs λ

 

csvFile := FileTools[Filename]("/VPhotopic.csv")NULL = "VPhotopic.csv"NULL

VPdata := ImportMatrix(csvFile) = Vector(4, {(1) = ` 471 x 2 `*Matrix, (2) = `Data Type: `*float[8], (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})NULLNULL

 

`&lambda;P` := [seq(1 .. 4000)]:

VP := ArrayInterpolation(VPdata, `&lambda;P`):             (ArrayInterpolation for x,y data VPdata returns y' for new x data lambdaP)

NULLVParray := [`$`([`&lambda;P`[n], VP[n]], n = 1 .. 4000)]:                     

Mearth := [`$`([n, Units:-Standard:-`*`(Units:-Standard:-`*`(M(Units:-Standard:-`*`(n, Unit('nm'))), Unit('nm')), Units:-Standard:-`*`(Units:-Standard:-`^`(Unit('s'), 3), Units:-Standard:-`/`(Unit('kg'))))], n = 1 .. 4000)]:````

``

dualaxisplot(plot([Mearth], lambda = 300 .. 900, style = line, color = [blue], labels = ["&lambda; (nm)", "M (W/nm m^2)"], title = "Spectral Radiant Exitance of the Sun", titlefont = ["ARIAL", 15], legend = [Exitance], size = [800, 300]), plot([VParray], style = line, color = [green], labels = ["&lambda; (nm)", "Relative Response"], legend = [Units:-Standard:-`*`(Units:-Standard:-`*`(Photopic, Relative), Response)]))

 

``

 

 

 

Illuminance in Radiometric and Photometric Units:

E__r := sum(Units:-Standard:-`*`(M(Units:-Standard:-`*`(lambda, Unit('nm'))), Unit('nm')), lambda = 200 .. 4000) = 984.7275549*Units:-Unit(('kg')/('s')^3)"(->)"984.7275549*Units:-Unit(('W')/('m')^2)NULL

NULL

E__po := Units:-Standard:-`*`(Units:-Standard:-`*`(683.002, Units:-Standard:-`*`(Unit('lm'), Units:-Standard:-`/`(Unit('W')))), sum(Units:-Standard:-`*`(Units:-Standard:-`*`(VP[lambda], M(Units:-Standard:-`*`(lambda, Unit('nm')))), Unit('nm')), lambda = 200 .. 4000)) = HFloat(91873.47376063903)*Units:-Unit('lx')NULL

Translation from Illuminance to Luminance for Reflected Light;

 

Object Reflectance          R__o:      

Object Luminance           L__po := proc (R__o) options operator, arrow; R__o*E__po/(Pi*Unit('sr')) end proc:                evalf(L__po(1)) = HFloat(29244.234968360346)*Units:-Unit(('cd')/('m')^2) 

 

Illuminance of a Camera Sensor  Eps applied for time texp determines Luminous Exposure Hp;

Ideal Illuminance is determined by the exposure time texp, effective f-number N and to a less extent the angle to the optical axis θ;

 

• 

H       Luminous Exposure

• 

Eps     Illuminance to the Camera

• 

N                                               Effective F-Number

• 

texp             Exposure Time

• 

θ        Angle to the Optical Axis    

 

E__ps_ideal = Units:-Standard:-`*`(Units:-Standard:-`*`(Units:-Standard:-`*`(Pi, Units:-Standard:-`/`(4)), L__po), Units:-Standard:-`*`(Units:-Standard:-`^`(cos(theta), 4), Units:-Standard:-`/`(Units:-Standard:-`^`(N, 2)))):

H__p_ideal = Units:-Standard:-`*`(E__ps_ideal, t__exp):

 

The camera meter determines the exposure time texp to balance the object luminance, reflectance and effective f-number. It does this based on an internal constant k and the camera ISO s.

• 

s        ISO Gain (Based on saturation at 3 stops above the average scene luminance)

• 

k       Reflected Light Meter Calibration Constant      k__m := Units:-Standard:-`*`(Units:-Standard:-`*`(12.5, Unit('lx')), Unit('s')):  

                                                                                                  for Nikon, Canon and Sekonic

• 

c        Incident Light Meter Calibration Constant       c__m := Units:-Standard:-`*`(Units:-Standard:-`*`(250, Unit('lx')), Unit('s')):        

                                                                                                  for Sekonic with flat domeNULL

N^2/t__exp = `#mrow(mi("\`E__po\`"),mo("&sdot;"),mi("s"))`/c__m                        (Incident Light Meter)  NULL 

Units:-Standard:-`*`(Units:-Standard:-`^`(N, 2), Units:-Standard:-`/`(t__exp)) = Units:-Standard:-`*`(`#mrow(mi("\`L__po\`"),mo("&sdot;"),mi("s"))`, Units:-Standard:-`/`(k__m)):                        (Reflected Light Meter)

NULL

Solve for H in terms of the Camera Meter Constant k and s

 

Es = Units:-Standard:-`*`(Units:-Standard:-`*`(Units:-Standard:-`*`(Pi, Units:-Standard:-`/`(4)), Lo), Units:-Standard:-`*`(Units:-Standard:-`^`(cos(theta), 4), Units:-Standard:-`/`(Units:-Standard:-`^`(N, 2)))): NULL

t = Units:-Standard:-`*`(Units:-Standard:-`*`(km, Units:-Standard:-`^`(N, 2)), Units:-Standard:-`/`(Units:-Standard:-`*`(Lo, s))):NULL

NULL

NULL

H = Es*t

H = Units:-Standard:-`*`(Units:-Standard:-`*`(Units:-Standard:-`*`(Units:-Standard:-`*`(Pi, Units:-Standard:-`/`(4)), Lo), Units:-Standard:-`*`(Units:-Standard:-`^`(cos(theta), 4), Units:-Standard:-`/`(Units:-Standard:-`^`(N, 2)))), Units:-Standard:-`*`(Units:-Standard:-`*`(km, Units:-Standard:-`^`(N, 2)), Units:-Standard:-`/`(Units:-Standard:-`*`(Lo, s))))"(=)"H = (1/4)*Pi*cos(theta)^4*km/sNULLNULL

 t = H/Es

t = Units:-Standard:-`*`(Units:-Standard:-`*`(Units:-Standard:-`*`(Pi, Units:-Standard:-`/`(4)), Units:-Standard:-`*`(Units:-Standard:-`*`(Units:-Standard:-`^`(cos(theta), 4), km), Units:-Standard:-`/`(s))), Units:-Standard:-`/`(Units:-Standard:-`*`(Units:-Standard:-`*`(Units:-Standard:-`*`(Pi, Units:-Standard:-`/`(4)), Lo), Units:-Standard:-`*`(Units:-Standard:-`^`(cos(theta), 4), Units:-Standard:-`/`(Units:-Standard:-`^`(N, 2))))))"(=)"t = km*N^2/(Lo*s)NULLNULL

H__p := proc (s, theta) options operator, arrow; (1/4)*Pi*k__m*cos(theta)^4/s end proc:                                              

  evalf(H__p(100, 0)) = 0.9817477044e-1*Units:-Unit(('cd')*('s')/('m')('radius')^2)"(->)"0.9817477044e-1*Units:-Unit(('lx')*('s'))NULL

 

Note:  Meters are typically set for a scene reflectance 3 stops below 100% or 12.5%.

           

  E__ps := proc (N, R__o, theta) options operator, arrow; (1/4)*Pi*Unit('sr')*R__o*E__po*cos(theta)^4/(Pi*Unit('sr')*N^2) end proc:               

 evalf(E__ps(16, Units:-Standard:-`/`(Units:-Standard:-`^`(2, 3)), 0)) = HFloat(11.215023652421756)*Units:-Unit('lx')                                                                                                   

t__exp_ideal := proc (N, s, R__o) options operator, arrow; H__p(s, theta)/E__ps(N, R__o, theta) end proc:                                     

  evalf(t__exp_ideal(16, 100, Units:-Standard:-`/`(Units:-Standard:-`^`(2, 3)))) = HFloat(0.008753862094289947)*Units:-Unit('s') NULL NULL

 

 

Actual exposure time includes typical lens losses;

 m := Units:-Standard:-`/`(80):``

Magnification  

  T := .9:``

Lens Transmittance

 F := 1.03:``

Lens Flare

V := 1: ``

Vignetting

 

                                                  ``

Total Lens Efficiency

q := Units:-Standard:-`*`(Units:-Standard:-`*`(Units:-Standard:-`*`(T, F), V), Units:-Standard:-`^`(Units:-Standard:-`+`(1, Units:-Standard:-`-`(m)), 2)):                                      evalf(q) = .9039698438NULL

 

Replacing Eps with q*Eps we get the "Sunny 16" relation between exposure time and ISO;  NULL

t__exp := proc (N, s, R__o) options operator, arrow; H__p(s, theta)/(q*E__ps(N, R__o, theta)) end proc:NULL               evalf(t__exp(16, 100, Units:-Standard:-`/`(Units:-Standard:-`^`(2, 3)))) = HFloat(0.009683798806264942)*Units:-Unit('s')NULL

t__exp_alt := proc (N, s, R__o) options operator, arrow; k__m*N^2*Pi/(s*q*R__o*E__po) end proc:                  evalf(t__exp_alt(16, 100, Units:-Standard:-`/`(Units:-Standard:-`^`(2, 3)))) = HFloat(0.00968379880412244)*Units:-Unit('s') 

• 

The Number of Photons NP Reaching the Sensor Area A;

• 

Circle of confusion for 24x36mm "Full Frame" for 1 arcminute view at twice the diagonal:

                          A__cc := Units:-Standard:-`*`(Units:-Standard:-`*`(Pi, Units:-Standard:-`^`(Units:-Standard:-`*`(12.6, Unit('`&mu;m`')), 2)), Units:-Standard:-`/`(4)):    

     

• 

  Sensor Bandwidth                                          Photopic Response VP

• 

  Exposure Time for Zone 5: Rscene=12.5% , Saturation in Zone 8 Rscene=100%

• 

  Camera ISO differs from Saturation ISO. Typical Saturation ISO is 2300 when the camera is set to 3200. See DxoMark.

 

NULL

The average number of photons for exposure time based on Reflectance of the scene  relative to the metered value:    

Zone 5;   R__meter := R__scene: 

NP := proc (s, R__o, theta) options operator, arrow; (1/4)*t__exp(N, s, R__meter)*A__cc*q*R__scene*cos(theta)^4*(sum(VP[lambda]*M(lambda*Unit('nm'))*Unit('nm')*lambda*Unit('nm')/(h*c), lambda = 200 .. 4000))/N^2 end proc: 

                                                                               evalf(NP(2300, 1, Units:-Standard:-`*`(0, Unit('deg')))) = HFloat(2191.5645712603696)  NULL

Zone 8;       R__meter := Units:-Standard:-`*`(R__scene, Units:-Standard:-`/`(Units:-Standard:-`^`(2, 3))):   NULL

NP__sat := proc (s, theta) options operator, arrow; (1/4)*t__exp(N, s, R__meter)*A__cc*q*R__scene*cos(theta)^4*(sum(VP[lambda]*M(lambda*Unit('nm'))*Unit('nm')*lambda*Unit('nm')/(h*c), lambda = 200 .. 4000))/N^2 end proc:  NULL

                                                                              evalf(NP__sat(2300, Units:-Standard:-`*`(0, Unit('deg')))) = HFloat(17532.516570082957)NULL

NULL

 

Approximate Formula

 

H__sat := proc (s__sat) options operator, arrow; H__p(s__sat, 0)*E__ps(N, 1, 0)/E__ps(N, 1/8, 0) end proc:      

                                                                                       evalf(H__sat(s__sat)) = HFloat(78.53981635)*Units:-Unit(('cd')*('s')/('m')('radius')^2)/s__satNULLNULL

Average Visible Photon Energy

P__e_ave := Units:-Standard:-`*`(Units:-Standard:-`/`(Units:-Standard:-`+`(850, -350)), sum(Units:-Standard:-`*`(Units:-Standard:-`*`(h, c), Units:-Standard:-`/`(Units:-Standard:-`*`(lambda, Unit('nm')))), lambda = 350 .. 850)):                    evalf(P__e_ave) = 0.3533174192e-18*Units:-Unit('J') 

NPtyp := proc (s__sat) options operator, arrow; H__sat(s__sat)*A__cc/(683.002*(Unit('lm')/Unit('W'))*P__e_ave) end proc: 

                               evalf(NPtyp(2300)) = HFloat(17644.363333654386)"(->)"HFloat(17644.363333654386)NULL

NULL

 

Download Photon_Exposure_Array.mw

I read this, but there was nothing on how to write a help associated with it.

Does anyone know where I can find it?

 

Many thanks,

 

casperyc

I actually had the same problem on Maple 16. When i go to plot an equation (usually on implicit plots) it just repeats the equation in blue text rather than showing any sort of plot. Im sure i am just missing a simple option somewhere, but for the life of me I cant find it. Any and all help would be appreciated. 

First 75 76 77 78 79 80 81 Last Page 77 of 87