Carl Love

Carl Love

28070 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

The debug thing is weird, but before you applied debug, everything seemed normal and as expected to me. The procedures followed the documented rules as far as I know them.

Nonetheless, thanks for pointing out / discovering a very interesting property of debug.

@jaytreiman ShowSolution won't do anything with this problem.

Coach: Start by letting u = x^6/6 because then du = x^5 dx. After you do that step, ShowSolution can do the rest.

@roman_pearce I wasn't saying that the grid size was the cause of the inordinately long time. I was suggesting that the bugs be worked out first on a smaller grid before trying for the 200x200, which may be small in the world of contour plots, but is still 64 times larger than the Maple default contourplot.

We must also consider the possibility that the function being evaluated is getting hung up on a particular grid point, or on a small subset of the points.

A slight improvement can be made by including the vertical range in the plot so that it matches the one in the implicitplot:

Q:= plot(f, x= -10..10, y= -10..10, discont);

 

A slight improvement can be made by including the vertical range in the plot so that it matches the one in the implicitplot:

Q:= plot(f, x= -10..10, y= -10..10, discont);

 

200 x 200 is quite a large grid. Have you tried on a smaller grid? How about posting the function that you're trying to plot?

@Markiyan Hirnyk Agreed. This is definitely a frequently asked question (FAQ).

Okay, that answers the question as posed. It seems that no environment variable can be used as a parameter. There is another symbol that I had in mind, not an environment variable, that cannot be used as a parameter. If you try to use it, then you will not get an error on the procedure definition; but the procedure will not work correctly.

Okay, that answers the question as posed. It seems that no environment variable can be used as a parameter. There is another symbol that I had in mind, not an environment variable, that cannot be used as a parameter. If you try to use it, then you will not get an error on the procedure definition; but the procedure will not work correctly.

@erik10 I compiled, and I got nearly identical results to you: The compiled versions are about 3 times slower than the non-compiled evalhf versions.

@erik10 I compiled, and I got nearly identical results to you: The compiled versions are about 3 times slower than the non-compiled evalhf versions.

@Markiyan Hirnyk I didn't claim that interpolant wouldn't work for BVPs. It doesn't work for IVPs, which is what the Asker has. There is apparently an equivalent option for IVPs called interpolate, which seems to have been deactivated.

@emma hassan Your f contains a constant term c[1,0]. This term disappears when you take the derivative. Thus, it does not appear in any of the equations E[r]. Thus, fsolve does not provide any value for it. So, when you try to use u, it still has an unevaluated c[1,0] in it.

@emma hassan Your f contains a constant term c[1,0]. This term disappears when you take the derivative. Thus, it does not appear in any of the equations E[r]. Thus, fsolve does not provide any value for it. So, when you try to use u, it still has an unevaluated c[1,0] in it.

It seems that interpolant only applies to BVPs, whereas the quote about an option "interpolation" is on a help page for rkf45, an IVP method. There also seems to be an undocumented (as far as I can tell) and inactive (as far as I can tell) option interpolate. Here's my attempts to use the options.

restart:
dsolve({diff(y(x),x)=y(x), y(0)=1}, {y(x)}, numeric, method= rkf45, interpolant= false);
Error, (in dsolve/numeric/an_args/SC) keyword was 'interpolant', optional keyword must be one of 'abserr', 'differential', 'event_doublecross', 'event_initial', 'event_iterate', 'event_maxiter', 'event_pre', 'event_project', 'event_relrange', 'event_stepreduction', 'events', 'implicit', 'initstep', 'interpolate', 'interr', 'maxfun', 'maxstep', 'minstep', 'optimize', 'output', 'projection', 'range', 'relerr', 'startinit', 'steppast'


dsolve({diff(y(x),x)=y(x), y(0)=1}, {y(x)}, numeric, method= rkf45, interpolate= false);
Warning, the 'interpolate' option has been removed, ignored...
proc(x_rkf45)  ...  end;

 

First 638 639 640 641 642 643 644 Last Page 640 of 709