Carl Love

Carl Love

28070 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@tomleslie You're right: I grossly underestimated the true size of the OP's plot. The options add a lot that I didn't account for. In addition to CodeTools:-Usage, it would be useful comparative information to apply length(...to each plot.

Doing that:

  • my 300x300 plot3d: 90,230 (roughly 3002)
  • the OP's 500x70 matrixplot: 18,828,337
  • your 500x70 matrixplot: 25,055,345 (!!!)
  • exact same matrix in matrixplot with no options at all: 35,088 (roughly 500*70).

So, the OP's matrixplot is about 536 (!) times larger (datawise) than the exact same matrix plotted in matrixplot with no options.

You do have a valid Question about dsolve here, but it has nothing to do with the rkf45 algorithm. This is a boundary-value problem (BVP). The rkf45 algorithm is for initial-value problems (IVPs). At this point, however, you don't need to worry about this; Maple can already figure out that this is a BVP.

@Carl Love WolframAlpha (which is available free online for calculator-type queries, such as your integral) gives the result as 

(-(x*HypergeometricPFQ[{1/2, 1/2}, {3/2, 3/2, 2}, -x^2/4]) + x*HypergeometricPFQ[{1/2}, {3/2, 2}, -x^2/4]*Log[x])/2

That translated into Maple is

x/2*(ln(x)*hypergeom([1/2], [3/2,2], -x^2/4) - hypergeom([1/2,1/2], [3/2,3/2,2], -x^2/4))

Maple 2019 gives the result as (I also applied simplify(..., size))

1/2*Pi*x*(BesselJ(0,x)*StruveH(1,x)-StruveH(0,x)*BesselJ(1,x))*ln(1/2*x)-x*
BesselJ(0,x)*D[1](LommelS1)(1,1,x)+x*BesselJ(1,x)*D[1](LommelS1)(0,0,x)+1/2*(-
Pi*x*(ln(2)-ln(x)-1)*StruveH(0,x)-2*ln(x)-2)*BesselJ(1,x)+1/2*(Pi*(ln(2)-ln(x))
*StruveH(1,x)+2*ln(x))*BesselJ(0,x)*x

A quick numerical check over real ranges confirmed (although it's not iron-clad proof) that these two expressions are equal.
 

Would you please define "URI"?

@HS That depends on whether x is the special field element (defined with alias and RootOf) or just a variable.

Your syntax problem is extra multiplication signs, plainly visible in the plaintext code in your Question. These probably come from extra spaces in 2D Input. In 2D Input a function name (such as Expand) must be immediately (without intervening spaces) to the left of the left parenthesis that begins its arguments. In 1D input, it doesn't matter. 

And do you want to do it in Maple Companion? 

Someone with the power to do so needs to add Maple Maple Companion to the Products list for Questions here.

@Rouben Rostamian  Yes, NextZero can be somewhat unreliable in that regard for functions that have an extreme number of vertical asymptotes, as this one does.

However, my Answer did show 245.3396184 and 481.5561050; you just need to scroll to right. Regarding 530.0902992 and 578.7535346: I'll admit that it looks like the function has roots near those values, but putting those numbers into the function at Digits=15 returns values far from 0.

@Joe Riel Neat trick. I'd only ever considered that for alternate spellings. It should be noted that the way that the unevaluation quotes work in _options['view'] is very special. Using 'view' or 'zoom' elsewhere in the procedure, the quotes have no effect, just like any procedure parameter. However, ':-view' and ':-zoom' act normally.

@mehran rajabi You can get some more roots like this:

Digits:= 15:
R:= table():
r:= 49.32883964:
Eq:= unapply(eq, x):
while r::numeric do 
    r:= RootFinding:-NextZero(Eq, r, maxdistance= 1e9);
    R[r]:= NULL
od:
indices(R, nolist, indexorder);
68.9303311172937, 106.974056704266, 151.062435474302, 198.382622867143, 245.339618384328,
291.310838331266, 338.964900033057, 387.685839558259, 434.873481747309, 481.556104974205,
672.896169599596, 721.880328695120, FAIL

The fact that FAIL was the last value returned doesn't necessarily mean that there are no more roots; it just means that NextZero gave up. If you want to search for more roots, let me know.

The following plot has 3 curves: red, blue, and green. The red one is your original linear interpolation. The green (vertical) corresponds to x = 808. The blue is another linear interpolation using the L[1] values in place of x[12]. Please explain the connection between this plot and what you actually want.

restart:
V[Ed13]:= <257.184, 230.4, 184.3, 138.2, 92.2, 46.1, 0>:
x[12]:= <-149, 208, 567, 925, 1283, 1642, 2000>:
L[1]:= <0, 358, 717, 1075, 1433, 1792, 2150>:
plot(
    [<x[12] | V[Ed13]>, < L[1] | V[Ed13] >, [[808,0], [808,250]]], 
    thickness= 2
);

@mmcdara Okay, it works in Maple 2019, but it's clunky unless you stabilize the extent of the vertical axis. That is, it helps if the vertical axis has the same "mathematical" length across the whole parameter range. You can do that by including a view option, or simply change the plot command to

plot(f, x= -3..3, 0..0.5)

Your worksheet is missing a definition of f. I assume that that just got deleted accidentally somehow, because it makes no sense (at least to me) without that definition.

We need to look at more-specific cases. Certainly it works in some cases, such as

asympt(HeunC(a, a, b, b, c, 1/z), z);

(works in Maple 2019).

@imparter 

Your first error above is that IBC is still not a set! It should be {IBC}.

The second error above is that you have Pa=0 where you should have Pa:= 0.

After you correct that, it'll complain that you don't have enough initial conditions. It wants 5. The only thing in your IBC that it considers an initial condition is p(r,-1) = 0.

The other post of mine that you linked to is not yet relevant! Your input hasn't even been accepted by pdsolve yet. Forget about the plots until the pdsolve is fixed,

Do not post followups as separate Questions!

First 235 236 237 238 239 240 241 Last Page 237 of 709