Carl Love

Carl Love

28055 Reputation

25 Badges

12 years, 362 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@jan123 

The command add simply adds a finite and definite number of terms. There's no attempt made at any simplification more complicated than adding.

The command sum performs summation of a finite, indefinite, or infinite number of terms.

You give initial conditions for |x| < 1, but what about |x| >= 1? Since x goes from -4 to 4, you'll need to specify that.

@jbail Are you sure that you entered plot3d with all lowercase letters?

@tomleslie 

I note that the code that works in Maple 2015 has option style= pointline. That is not a valid style value in Maple 18. I don't have Maple 2015 immediately at hand to make a comparison, but I think that the style is the key to this.

@Spinosaurus You wrote:

[I]f I use Ctrl+C and Ctrl+V to insert code (plot(L0[.., 1], L0[.., 2])) from Maple in my comment, I will obtain this result: plot(L0[() .. (), 1], L0[() .. (), 2]).

When you cut and paste from 2D input to plaintext, it translates the code to an unabbreviated form. So .. becomes ()..()x-> becomes proc(x) option operator, arrowa and b becomes `and`(a,b), etc.

@brian bovril Tom's code uses the 1-argument form of add, which is new to Maple 2015. To retrofit the code, simply change add to `+`@op.

@ Hmm. I could convert the numeric evaluation of the Jacobian to compiled code. By using float[8] Matrices and Vectors in the call to LinearSolve, you could get it to use the compiled code.

@Konstantin@ 

I believe that database files are constructed with every line being equal in length. Certainly this has been true for every database system that I've ever worked with. So I don't think that there is a more-elegant solution.

@testht06 

You should know by now what I'm going to say: Ask it as a new Question/thread! Why are you so resistant to asking new Questions?

@ 

It is no surprise that you hadn't found it. The idea that one would need to load an environment, or that there would be more than one of them, seems counterintuitive to me, and poorly documented. Now that I understand the concept, it makes sense that there are multiple environments.

I don't see your attached worksheet. 

@tomleslie You wrote:

so I never did find out why $ was so much slower than seq - I just stopped using $

It's not as simple as that. Even if temporal efficiency were the only criterion by which to decide between and seq, one couldn't say that seq was always better. In the case under discussion in this thread---the repetition of a single term---is about twice as fast.


restart:

ulim:=10^8:

t1:=time():

ans:= x $ ulim:

t2:= time()-t1;

 

3.125

restart:

ulim:=10^8:

t1:= time():

ans:= seq(x, i= 1..ulim):       

t2:= time()-t1;

 

6.094


Download seq_vs_$.mw

 

@tomleslie You wrote:

The fact that your first application of the odetest command, i.e.,
     odetest(puta, odesys)
does not return 0, indicates that your putative solutions (puta) are not valid for your ODE, odesys.

That's not entirely true, especially when the putative solution contains parameters. If odetest returns 0, that's an unequivocal affirmation of the validity of the solution. But if it returns nonzero we must ask Do there exist values of the parameters such that the returned expression(s) equal(s) zero for all values of the independent variable? Here's a well-known example:

 

ODE:= {diff(y(x),x,x)+a*diff(y(x),x)+b*y(x) = 0};

{diff(diff(y(x), x), x)+a*(diff(y(x), x))+b*y(x) = 0}

puta:= {y(x)=exp(r*x)};

{y(x) = exp(r*x)}

odetest(puta, ODE);

{r^2*exp(r*x)+a*r*exp(r*x)+b*exp(r*x)}

solve(%,r);

{r = -(1/2)*a+(1/2)*(a^2-4*b)^(1/2)}, {r = -(1/2)*a-(1/2)*(a^2-4*b)^(1/2)}

 

 

Download odetest.mw

So in this way odetest can used to derive an ansatz solution. It appears to me that that is what the OP is attempting, although I am not claiming that that attempt has been in any way sucessful.

 

This is just a posting tip; I don't have any advice regarding your PDE problem. There is unfortunately no MathJax / LaTeX interpretter on MaplePrimes. So, IMO, you decrease the readability of your post by including those dollar signs and underscores.

@laporte bernard 

Okay, now that you have it uploaded, do you have a question about the Gershgorin disk program?

First 489 490 491 492 493 494 495 Last Page 491 of 709