Carl Love

Carl Love

28100 Reputation

25 Badges

13 years, 105 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@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?

@Alejandro Jakubi 

You make a good point.

@Alejandro Jakubi 

I think that the OP has confused supplementary and complementary. After all, their meanings are similar in nonmathematical English.

Try the restart command.

Hint: The limit of a sequence always means the limit as the index variable approaches infinity. If that limit exists and is finite, we say that the sequence converges; otherwise we say that it diverges. The wording of your problems suggests that you first need to check the convergence, and only then compute the limit. That's not how most limit-of-sequence problems (where the closed-form expression for the general term is known) are done in practice. In practice, the very act of computing the limit determines the convergence.

@tomleslie 

The difference between interpolating and fitting is that with interpolating the given points are presumed to be exact, without experimental error. So, the interpolating function definitely passes through the given points.

@jbendler 

I don't immediately see how to deal with the initial singularity in the ODE IVP when 0 < beta < 1. I request the input and assistance of my colleagues here at MaplePrimes. At the initial point, the ln factors are zero, and those factors are raised to a negative power, -1/beta (or, if you combine the ln factors, it's 1-1/beta, which is still negative). Yet the curve still seems well-defined; it just has a derivative of +infinity at the inital point. So there should be some way to get a solution. Perhaps a substitution with dchange?

@jbendler 

I am curious what are the allowed and/or typical values of the parameters, especially a and beta. I chose very easy (but nontrivial) values above. There are some more-complicated issues involved in numerically solving the ODE for other beta.

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