Carl Love

Carl Love

28015 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

Do you want to use both the slash ( / ) and the other division symbol as input in the same Maple session? If so, then do you want them to have some subtle difference in interpretation, such as precedence? 

@imparter The error is due to what I said in my Answer: Maple's stock numeric PDE solver can only handle 2 independent variables. You have 3.

@C_R I promoted your excellent investigation to Answer so that I could vote it up. 

I vote up for the Question also; almost every Question from @nm gets a vote up from me.

@nm The difference between subs and eval is that eval tries to be wary of performing mathematically invalid operations, whereas subs explicitly and intentionally ignores mathematical subtleties and operates purely syntactically. The n in the Sum is a bound variable, and changing subexpressions that contain bound variables is something that can be mathematically dubious. 

The significant difference here is NOT that subs does not do evaluations (although that is indeed true); it's that eval tries to NOT do mathematically invalid substitutions.

Note that I'm not saying that this particular operation is mathematically invalid! But messing with bound variables is something that eval is rightfully wary about.  

Although a multiple subsindets or evalindets isn't needed in this particular case, there are times when it is needed, and the syntax (described at ?subsindets) allows for something shorter than what you had. Like this:

subsindets(expr, specfunc(Sum), subsindets, indexed, f-> b[op(f)])

This can be extended to any number of subsindets and/or evalindets, and they can be mixed.

@Carl Love I just read your ending part about the local and global a. You can just use 
subs(a= b, ...and it'll only change the local a. Like this:

MySum:= (A, b::name, r)->
local 
    a,
    S:= Sum(x^(_n+r)*a[_n]*(_n+r)*(_n+r-1)+a[_n-1]+3*A*x^10, _n = 0 .. infinity)
;
    subs(a= b, S)
:
MySum(a, B, r); 


 

@nm Okay, I get your point. Yes, it could detect this anomaly and simply refuse to plot some of the arrows if need be. And this should be implemented.

@nm Note that the arrows extend beyond the solution curve to the y boundaries, into the complex-valued part of the range. If the arrows are straight, that's easy to do (although not very accurate): It uses the arrow's base point as an initial condition, does a one-step solution of the ODE to get a slope, and draws a straight line segment. But for curved arrows, it needs to solve the ODE over the length of the arrow, for every arrow.

@Gabriel Barcellos 

Both Acer's Comment and my code adjustment only make any difference when the expression has only 1 term. In the jargon of computer programmers, we call that a "corner case". Note that the _z doesn't occur in A01, and, of course, it doesn't have any functions. Thus it can't change the desired answer; it merely prevents you from getting the undesired answer when A01 has only 1 term.

I can give you a deeper explanation if you want.

@SHIVAS The variable j is a for-loop index, and you're trying to use it outside of the for-loop. In this case, the value of j is 5 after the loop ends.

@Gabriel Barcellos Are you claiming that you see some difference between the two plots that you posted other than the font used for the tick labels and axis labels?

@C_R Thank you.

I made a small change to the MathML code in my Answer to improve the visibility of the numbers in the box. Would you please post a screenshot showing this (the plot, cursor, and box)? I don't know how to make a screenshot on my computer.

@SHIVAS Can't you see that there's a big empty space in the middle of your worksheet where there should be a pdsolve command? The error messages shown indicate that there was one there, and that it was at least syntactically correct. 

If you have a version that works, as you just said, post that.

@Suryakanth I think that you perhaps think that there's some small nuance of a plot command that can be "rectified" and then everything will work. But, actually, it's far more complicated than that. For example, there is no command named pdeplot. There is a command PDEplot, but it can only be used for a single first-order PDE. That's just an example; there are numerous other flaws. 

@nm When arrowsize is specified as a number, it is just a multiplier applied to the arclength of all arrows, and all arrows have the same arclength. This length is independent of the scaling of the axes or the implied 3rd dimension. This is different than arrowsize= 'magnitude', where the length of the arrow shows the field strength (which is the 3rd dimension). In the present case, it's the color that shows the field strength. So, I think that your concern about needing to change the arrowsize for different plots is not likley to actually be a problem.

First 31 32 33 34 35 36 37 Last Page 33 of 708