Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

So below is a calculation im trying to create, but it just tells me there is an unexpected IF error, and returns me to the third For line. I have tried it straight and as a procedure but i just cant seem to get it to work. Any ideas or tweaks to make this work would be much appreciated. All of the other variables I've named work in their respective lines of code, which I have left out as it is long as it is!


ComlexAlgorithm:= proc(L)
local N, j, kf, o, DeltaMag, DeltaBond;
global NConfig, Configz1, Col, Row, OldConfig, NewConfig, NewTable;

# Set Delta values to zero.
DeltaMag:=0:
DeltaBond:=0:

# Creates loops to loop through the correct changes in values i.e. Add -1, then 1 to first point, move across each point one by one, repeat from the beginning for each configuration then repeat whole process for the amount of rows.
printlevel:=4:
for N from -1 to 1 by 2 do
   for j from 1 to Col do
      for w from 0 to NConfig-1 do   
         for o from 1 to Row do

# Calculate DeltaMag.
if N=-1 then DeltaMag:=DeltaMag+1 else DeltaMag:=DeltaMag-1
end if:

# Calculate all relevant bonds i.e. 3 values for DeltaMag, except at "corner" lattice points where there is only 2 bonds.
if N= Configz1[w](o, j) then DeltaBond:= DeltaBond-1 else DeltaBond:= DeltaBond+1
end if:

if j-1>1 then
   if N <> Configz1[w](o, j+1) then DeltaBond:= DeltaBond+1
      if N = Configz1[w](o, j+1) then DeltaBond:= DeltaBond-1
else DeltaBond:= DeltaBond
end if:
end if:
end if:

if j+1<Col then
   if N <> Configz1[w](o, j+1) then DeltaBond:= DeltaBond+1
      if N = Configz1[w](o, j+1) then DeltaBond:= DeltaBond-1
else DeltaBond:= DeltaBond
end if:
end if:
end if:

# Calculate if, and by what degree, conifguration number changes using 2^(j-1) which is the arithmetric series for binary. Changes only occur when "incoming" spin is different.
if N= -1 then
   if Configz1[w](o, j) <> N then NewConfig[w]:= OldConfig[w-(2^(j-1))] 
else NewConfig[w]:= OldConfig[w]
end if:
end if:

if N= 1 then
   if Configz1[kf](o, j) <> N then NewConfig[w]:= OldConfig[w+(2^(j-1))] 
else NewConfig[kf]:= OldConfig[w]
end if:
end if:

NewTable[kf]:= [NewConfig[w], BondEnergy(w)+DeltaBond, MagEnergy(w)+DeltaMag];

# Set Delta values to zero to finsh.
DeltaMag:=0:
DeltaBond:=0:

end do:
end do:
end do:
end do:
end proc:

Hi.

Lets say im given 2 surfaces like this:

S1: z=x^2+y^2 and S2: z=-2x

To find all the points on this surface i set z=z and obtain the equation, but lets say I was given an arbutary vectorfield and was required to find the outward flux I would need and parametric equation for the surface which is now a solid enclosed by 2 surfaces.

 

Of course I could apply the divergence theoreme and integrate the divergens over the entire volume using tripple integral. This I suppose this requires a bit more work compared to using the vector calculus package.

 

Would anyone give me an hint on ho to acheive this? Im also looking to plot the object crated by the bounderies of the divergenc theorem bounderies

Int(Int(Int(4*z, z = x^2+y^2 .. -2*x), y = -sqrt(-x^2-2*x) .. sqrt(-x^2-2*x)), x = -2 .. 0)

I just happened to be searching older posts and could not find this one I created

  Why we buy - The science of shopping
 
September 18, 2009
Christopher2222

It must have be zapped by a spamming filter or something. 

**edit added**  heres another I can't seem to find

Numb3rs, Maple and Wolframs Mathematica
 
July 23, 2009
Christopher2222

   Consider a surface of the unit sphere about the origin, intersecting the volume of the cube [-a..a,-a..a,-a..a] 0<a<1.  What is the best Maple method to plot this surface with a direct mapping, that is without use of implicit plotting over a volume or rejecting grid points?

so yep pretty self explainatory, i was just wondering why it works when i use the asymptomatic expansion but not the iterated reciprocal substitution code shown in the that help interface for asympt.

``

``

Zeta(1/2+I*y)

Zeta(1/2+I*y)

(1)

subs(y = 1/y, series(subs(y = 1/y, Zeta(1/2+I*y)), y = 0, 6))

Error, (in series/Zeta) unable to compute series

 

asympt(Zeta(1/2+I*y), y, 6)

1+exp(-I*ln(2)*y)+exp(-I*ln(3)*y)+exp(-(2*I)*ln(2)*y)

(2)

``


 

Download MAPLE_IS_FUNNY.mw

Hello

Hope everything going fine with you. I am facing problem to fine the exact (numerical) solution of the attached system of linear PDEs associated with BSc and ICs. I tried to solve it without BCs and ICs, with BCs and with ICs also all the times I failed. Please solve it either general, with ICs or BCs. You can try to solve it numrically. In attached file H(t) represent the unit step function. I am waiting your positive response.

PDEs_solve.mw 

With my best regards and sincerely.

Muhammad Usman

School of Mathematical Sciences 
Peking University, Beijing, China

hi ..how i can rewrite answer in compressive format. that result seen readible and incomplex.for example how i can use change of variable, in order to final result has a short format...

thanks1.mw

 

Why would firewalls cause issues with connecting to the maple kernel if the CAS is entirely self contained (as ive been told before on this forum)

I am having issues with Maple 2016 computing closed form solutions using the sum command. For example, sum((-1)^n, n = 1 .. infinity) evaluates to -1/2 in the help topic, however, when I run the command in a maple document, this result is not obtained. It instead returns sum((-1)^n, n = 1 .. infinity). Likewise, sum( a*r^k, k = 0..infinity) doesn't evaluate to -a/(r-1). How can I get Maple to determine closed form solutions for power series?

Why do you need `or` in an if-test if say:

if `or`(seq(R[i]=R[k], k=1..i-1)) then
.......
end if;

If I run the test without the `or` (Boolean type logical, I know) it does not work.

Can anyone help me?

How get answer of this integral

int(1/u.t.exp(-t/u), t = 0 .. infinity)

Hello,

To have to better overview of a package, I would like to be able to group/ ungroup all the lines inside a subpackage as it is possible to do for example in a worksheet.

Is there a possibility to group lines (as a section) inside a package ?

Thank you for your feedback


 

dsolve({Q(0) = 0, Q(t) = (1.375*4190)*(80-T__1(t)), Q(t) = (1.375*4190)*(T__2(t)-38.2), diff(Q(t), t) = (240*0.1375e-1)*(T__1s(t)-T__2s(t))/(0.1e-2), diff(Q(t), t) = (0.1375e-1*47.6035070726347)*(T__1(t)-T__1s(t))*(T__1(t)+T__1s(t))^.438263122318020*((T__1(t)-T__1s(t))^.327228811371115), diff(Q(t), t) = (0.1375e-1*47.6035072491656)*(T__2s(t)-T__2(t))*(T__2(t)+T__2s(t))^.438263121701134*((T__2s(t)-T__2(t))^.327228811154163)}, numeric)

could you help with this? maybe because of too long exponents or just a maple bug?

when i try to solve this DAE it just crash. it says connection with kernel has been lost, and tells me to look for online help.

thank you very much...
 

Download crash_ecuation.mwcrash_ecuation.mw

Hello!

Hope everyone good. I am facing problem to define a loop. Actually I want to solve the attached file for different values of H like H=[100,125,140,160] for this I don't know how to tackle it. My program do working on single value of H. Please solve my problem as soon as possible. I am waiting your positive response. 

Help.mw

With my best regards and sincerely.

Muhammad Usman

School of Mathematical Sciences 
Peking University, Beijing, China

First 1017 1018 1019 1020 1021 1022 1023 Last Page 1019 of 2216