Robert Israel

6522 Reputation

21 Badges

18 years, 180 days
University of British Columbia
Associate Professor Emeritus
North York, Ontario, Canada

MaplePrimes Activity


These are answers submitted by Robert Israel

The infinite sum would be

Sum(1/((2*k+1)*(2*n+1)^(2*k+1)),k = 0 .. infinity) = 1/2*ln(1+1/n)

Thus your sum up to m is

1/2*ln(1+1/n)-R[m]

where

R[m] = Sum(1/((2*k+1)*(2*n+1)^(2*k+1)),k = m+1 .. infinity)

Now the dominant term here as n -> infinity is the one for k=m+1, i.e.

R[m] = O(n^(-2*m-3))

and the rest follows easily. 

Perhaps a picture will help.  What can you say about the green triangle?

By the way, that should be 6300 km, not 63000.

First problem: you have kx where you want k*x.

Second: you need to simplify ln(C*exp(-k*x)).  Maple doesn't do this automatically because the simplification is not necessarily true for complex variables.  You'll need an assumption.
So:

> eq:= simplify(-ln(C*exp(-k*x)) = funcx) assuming positive;
   solve(identity(eq, x), [C, k]);

 

You've used the wrong syntax in your initial conditions.   Instead of D(theta(t))(0) use D(theta)(0), and similarly for psi.

>

It works for me, and has worked in all versions of Maple as far as I know.  Can you upload your worksheet?

with(plots):
P1:= plot(psi[n], x= -a .. a, colour=blue):
P2:= plot([[[-a,-1],[-a,1]],[[a,-1],[a,1]]], colour=red):
display([P1,P2], view=[-2..2,-1..1], title="Wave function", xtickmarks=[-a=-'a', a='a']);

A work-around is to have a different set of variables (which visually look like the old variables).  For example:

> vars:= [x,y,z];
    newvars:= map(convert,vars,`local`);
    mapping:= zip(`=`,vars, newvars);
   invmapping:= zip(`=`,newvars, vars);

> f:=  5* y* z* x + 3* x^2;
   g:= sort(subs(mapping, f), subs(mapping, x), descending);

> f, g;

5*y*z*x+3*x^2, 3*x^2+5*y*z*x

If I understand you correctly, you want the 24 4 x 4 permutation matrices corresponding to the members of the symmetric group S4.  These permutations (as lists) can be obtained by

> S4:= combinat[permute]([1,2,3,4]);

The matrix M corresponding to a list L has M[i,L[i]] = 1 and otherwise 0.

> S4Matrices:= map(L -> Matrix(4,4,(i,j) -> charfcn[{L[i]}](j)), S4);

 

Unfortunately Probability is not very clever on inequalities involving several discrete random variables.  You could try (for a case like this where the random variables take nonnegative integer values, and z will be a numeric constant)

> Dfunc:= (x,y,z) -> add(Probability(X(x) + X(y) = t), t = 0 .. ceil(z) - 1);

Then for example

> Dfunc(x,y, 3);

exp(-y)*exp(-x)+exp(-y)*x*exp(-x)+y*exp(-y)*exp(-x)+1/2*exp(-y)*x^2*exp(-x)+y*exp(-y)*x*exp(-x)+1/2*y^2*exp(-y)*exp(-x)

> simplify(%);

1/2*exp(-x-y)*(2+2*x+2*y+x^2+2*y*x+y^2)

This of course turns out to be a function of x+y.

> normal(eval(%, y = t - x));

1/2*exp(-t)*(2+2*t+t^2)

You can't expect to solve equations involving this symbolically, but you can solve them numerically using fsolve.  For example

> fsolve(% = 0.5, t = 0 .. infinity);

If you really want the solution in radicals of a quartic, you can use

> solve(yourequation, a, explicit);

or in older versions of Maple

> _EnvExplicit:= true;
   solve(yourequation, a);

Caution: the results are not going to be pretty.  For most purposes, the RootOf's are easier to deal with.  What do you want to do with the solution?

This is something I've complained about before.  What Maple's backup facility does is mainly provide a false sense of security.

Unfortunately, Maple normally deletes the backup (*_MAS.bak) file when it closes the worksheet.  It's not even in the Recycle Bin, it is gone.  The only possibilities
once the worksheet is closed are

1) if Maple actually crashed before deleting the backup, it will still be there

2) if you had sufficient foresight (which nobody does) you could rename the _MAS.bak file before closing the worksheet.

3) use file utilities that can recover deleted files.  If this was in a public lab and happened a number of hours ago, good luck with that.

Q1:  How do I enter more lines in the above 2-D form of the piecewise construct in case I need more lines?
(I find the 2-D form much clearer).

One thing you can do is (perhaps in another worksheet) produce a piecewise output with the right number of lines, perhaps using 1D input, and copy-and-paste that output to your input line.

Q2: How do I programatically obtain the time to the trigger event (the 'halt' time)?

Like this perhaps:

> sol := dsolve(eqnsics, numeric, {xS(t)}, stiff = true, abserr = 10^(-8), relerr = 10^(-8), events = [[diff(xS(t), t) = 0, halt]], implicit = true, output = procedurelist);
   sol(2);
   if sol(eventstop) = 1 then t1:= subs(%,t) end if;

Q3: How do I programatically obtain the second derivative diff(xS(t),t@2)? and then plot it?  I suspect perhaps eval (evalf or evalhf) may be involved, but I have no clue.

> xtt:= solve(eqn1, diff(xS(t),t$2));
    plots[odeplot](sol, [t, xtt], t = 0 .. t1);

> with(gfun):
    s:= series(sin(x),x,10);
    seriestolist(s);
    listtorec(%,a(n));
    rectodiffeq(%[1],a(n),y(t));
    dsolve(%);

> Using:= proc(T::table,f::procedure) 
   subs([seq(t=T[t], t=map(op,[indices(T)]))], eval(f)) end proc:
> f:= Using(DEtools, proc(whatever) whatever end proc);

> sys:= {a*x*y + b*x - c*x*(x+y) = 0, d*x*y + e*y - f*y*(x+y) = 0};
   solve(sys, {x,y});

First 14 15 16 17 18 19 20 Last Page 16 of 138