dharr

Dr. David Harrington

8270 Reputation

22 Badges

20 years, 360 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

There is a missing line in your output - a list of integers which can be converted to known mersenne primes. My output has the following line after the first "end if":

w := [2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917, 20996011, 24036583, 25964951, NULL];

So the routine has no smarts... Try showstat if you can't see it on another try.

 

If you think about eval([x,y],{x=0,y=-1}) giving [0,-1], then you can work this up with map2 to give what you want:

q:={x = 0, y = -1}, {x = 3/4, y = -7/16}:

map2(eval,[x,y],[q])[];

gives

[0,1],[3/4,-7/16]

as required. This works for any number of solutions returned by solve.

 

Sorry, bad copying job; it is op(0,q) which gives y. But note that op(q) is the same as op(1,q) in this context.
q:=y[2]; Then op(q); gives 2 and op(1,q) gives y
As Robert Israel points out, in a Maple plot, you need to specify all parameters. If you want to see how the plot changes with parameter k, then you can plot a 3d plot, with k as one of the axes plot3d(k*x^2 - k*x^4,x=-10..10,k=-10..10); If a plot has a universal shape, then it can be non-dimensionalized, and the non-dimensionalized plot then encapsulates all possible behaviors. For your case of x=k, one defines the (nondimensional variable) X=x/k, and then plots X=1. For the case of y=k*x^2 - k*x^4, let Y=y/k, then Y=x^2 - x^4 has no parameters and can be plotted.
Maybe the @ notation is a nice alternative
(f@x)(t);
           f(x(t))

D(f@x)(t);
           (D(f))(x(t))*(D(x))(t)

convert(%,diff);

           (eval(diff(f(t1), t1), t1 = x(t)))*(diff(x(t), t))

X:=(u,T)->u*cos(T);
Y:=(u,T)->u*sin(T);
plot3d([X(u,T),Y(u,T),u],T=0..2*Pi,u=0..1,axes=boxed);
For these sorts of problems, I usually rename the file to *.txt; often the virus checker is more worried about the end user double-clicking on *.exe or other dangerous filetypes than actually looking closely at the content (unless of course there is a known virus in there!).
I have certainly zipped (using PKZIP under Windows) directories containing *.lib, *.ind, *.hdb and other types of files without any difficulty. Haven't tried *.mla yet. Note that if you create with march, you get to specify the size, so this gives you some control - see help under repositories or march.
I think the original question was about the diagonalizable nature of matrices, i.e., whether a similarity transform converts them to a diagonal matrix. Here again there is no correlation,
[1 0]
[0 0]
is trivially diagonalizable (because it is already diagonal) and has determinant zero, but
[0 1]
[0 0]
is not diagonalizable and still has determinant zero. Diagonalizability has more to do with whether there are missing eigenvectors. When the eigenvalues are all distinct, the matrix will be diagonalizable, but if some eigenvalues are equal then the matrix may be non-diagonalizable (or may be diagonalizable). Whether or not the degenerate (equal) eigenvalues are zero (determinant will then be zero) or not is not relevant to the question of diagonalizability. To check diagonalizability, one looks at the Jordan form to see if it is diagonal - see Maple's JordanForm.
Don't have a TI calculator, but maybe something like with(plots): animate( plot, [[sin,D(sin)], 0..x], x=0..2*Pi );
You can always do the taylor series and then convert theta to theta(t) afterwards with subs. If f is an expression with thetas and alphas in, then subs(theta=theta(t),alpha=alpha(t),f); I find myself doing this a lot. I work on various manipulations without the t, and then add them just before I solve the DEs.
An example of one of your DEs would help, and what output your are expecting. The following may be useful: f:=cos(theta)+sin(theta)+theta^2+theta*alpha; mtaylor(f,theta,2); gives 1+(1+alpha)*theta So all terms work the way you want except the theta*alpha, which you want to disappear. This works better: Student[MultivariateCalculus][TaylorApproximation](f,[theta,alpha]=[0,0],1); gives 1+theta It might be easier to think in terms of the Jacobian matrix if you have a system of DEs
If you plot plot(erf(ln(x)),x=0..10); you see that the function is negative and nice from 0..1, and indeed you can integrate this bit int(erf(ln(x)),x=0..1); gives -exp(1/4)+exp(1/4)*erf(1/2). From x=1 to infinity the function rises from zero and then asymptotically approaches 1. So the integral of this part must be infinity. Maple seems not to have an analytical answer for, say, the integral from 1 to 2, so here I guess you will have to be satisfied with a numerical answer (and therefore also for arbitrary a and b). Cheers, David.
This works for me (in Maple 10). evalc assumes real anyway so that part is redundant. Both evalc and evalc(Re()) work:
q:=(zks/(alphas+I*vs)*(exp(-I*times*vs)-exp(-I*times1*vs-alphas*tds))):
simplify(evalc(Re(q)));
gives
zks*(alphas*cos(times*vs)-alphas*exp(-alphas*tds)*cos(times1*vs)
 -vs*sin(times*vs)+vs*exp(-alphas*tds)*sin(times1*vs))/(alphas^2+vs^2)
First 74 75 76 77 78 79 80 Page 76 of 82