Carl Love

Carl Love

28150 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@ecterrab I agree about the potential confusion caused by Maple's type algebraic, and so it would likely be best to avoid the word. (Although, I wish that that type name were changed! Type algebraic is much more general than the mathematical concepts algebraic numbers, algebraic functions, or algebraic equations (as in "system of differential-algebraic equations (DAEs)). That's never going to happen though.)

Regarding not versus non-: Not is an adverb, and in this case it modifies the verb can include. So, as it stands, the help-page phrase is equivalent to "can include ODEs and cannot include differential equations", and this is how nm understood it. To negate an adjective such as differential, use the prefix non-, which may also be attached without a hyphen.

I deleted a duplicate of this Question, whose only difference seemed to be different names of the variables. 

@janhardo A restart command should always be placed in its own execution group (its own prompt). While it usually doesn't cause problems if it's mixed with other commands, when it does, those problems are usually GUI related and difficult to predict. This is because the GUI and kernel run asynchronously. This is my first suspicion for the restart problem that you describe, but it's only a suspicion.

@nm The help-page phrase that you asked about, "...can include ODEs and not differential equations", should be "...may include ODEs or non-differential equations" or "...may include ODEs or algebraic equations". Does that clear up the confusion for you? And, if so, which of the two alternative rephrasings is clearest?

@9009134 Here it is:
 

Download GradPlot.mw

@janhardo The mathematical meaning of path integral is not completely standardized, especially in other languages. I think that to be completely clear, one must specify either scalar line integral or vector line integral.

And neither of these should be called a surface integral, which is an integral whose region of integration is a surface. The result of a scalar line integral can be interpreted as a difference of surface areas above and below the xy-plane, but that is not reflected in the integral's name.

The Wikipedia article "Line integral" has an excellent animation to illustrate this surface-area interpretation. 

@9009134 Just adding code is not enough. You must follow the steps that I specified, in the order that I specified:

1. Remove some lines.

2. Add some lines.

3. Re-execute the entire worksheet with the !!! button.

The error that you're seeing is due to aspects of the Physics[Vectors] subpackage still being active. The issue is not due to a bug in that package; rather, the package is simply inappropriate for this purpose.

 

What you want to do is possible.

But it's not possible that the code you show above, by itself, could produce the output that you show. Please provide the complete code that produced that output.

@David Sycamore Add the option

axis[2]= [mode= log]

inside the parentheses of the plotting command. I'm not sure if this will work in your version of Maple. Let me know.

Unfortunately, int(exp(a*t^b), t) ​​​​​​for explicit real constants a and b returns in vastly different forms depending on a and b. Sometimes it returns WhittakerM functions, sometimes it returns incomplete GAMMA functions (which are much simpler), and sometimes it returns unevaluted (such as for a=1, b= Pi). Can it be taught to always return the GAMMAs?

@Carl Love I want to emphasize that I am not claiming that the vector-field plot above has any relevance to the physical problem described. It simply illustrates the steps that one must take to plot the gradient of a 2-variable function.

@ecterrab You wrote:

  • I am a non-native-English speaker...

But I suspect that you've lived primarily in the English-speaking world longer than nm has been alive, so it's not quite the same thing.

  • ...but I don't see what would be wrong with this use of "work as well" in this sentence of this help page.

There's nothing at all wrong with it if the intended audience is people fluent in spoken English. But the intended audience should be considered to include those whose primary exposure to English is written technical literature and technical online forums rather than speech. There are 2 or possibly 3 reasons why as well may not be the best choice for this broader audience:

  1. The phrase as well is idiomatic, which means that its meaning cannot be deduced from the meanings of its individual words. Indeed, in archaic usage it was a single word: aswell.
  2. It's primarily used in spoken English; in written English, it's usually replaced by also (if it means also).
  3. As used in the help page, it appears in the middle of its clause. That's a bit awkward; when it means also, it usually appears at the end of its clause (except possibly in Canada).
  4. (Doesn't apply to this example.) Its spoken usage is slightly different in Canada, where it may be used at the beginning of a sentence.

And by no means am I implying that you should've known any of this when you were writing that help page! I believe that editing such material for a technical, international audience can only be done by a professional technical editor.

Just for the record, the phrase in question is "works as well", not "work as well". However, all the points that I made above would apply to either phrase.

@Arif Ullah khan You wrote:

  • I face another issue here that when we choose a particular value for B, then for different values of infinity we get different solutions. It seems that infinity play a role of parameter here.

Yes, but I see that as the best thing about this algorithm. Since the equations are being numerically solved as IVPs rather than BVPs, it is trivial to simply keep extending the right boundary until the value of the second derivative  stabilizes (to within, say, epsilon = 0.5e-4 = 4 digits). This stable value is what the author calls C or C(B) (or C with an overbar in the case of the 2nd equation). Finding a good value for the fake infinity is often the most challenging part of solving these boundary-layer BVPs.

So you need to get used to not using a fixed value for the fake infinity. The suitable value will depend on the parameters.This would be much more difficult to do with either a mesh-based BVP solver or a shooting method. 

 

@rlopez The worksheet's Startup Code contains

restart:
with(plots):
with(plottools):

To view the Startup Code, go to the Edit menu, and it's near the bottom of that menu.

The streams command does work to produce a plot from the 2-variable scalar function V. (I'm not claiming that this plot has any significance to the physical problem being considered. It's just a correct plot of a specific mathematical function.) The problem arose when trying to plot the gradient of V.

@9009134 Okay, you mean that you a vector-field plot of the gradient. That's doable.

To understand my last comment, you need to look at the code of procedure streams by expanding the Code Edit Region in the worksheet that you posted. Here it is:

streams:=proc(n,fcn,pts,name) 
       local f,k,DISK,p; 
       f:=transform((r,th) -> [r*cos(th),r*sin(th)]): 
       DISK:=disk([0,0],1,color=red); 
       for k from -n by 2 to n do 
             p[k]:=implicitplot(fcn=2*k/n,x=-n/2..n/2,y=-Pi..Pi,numpoints=pts): 
       od: 
       display(seq(f(p[2*i]), i=-n/2..n/2), DISK, view=[-n/2..n/2,-n/2..n/2], scaling=constrained, axes=boxed, title=name); 
end:

As you can see, it uses implicitplot​​​​​, which is not a command that can plot a vector field.

Here's how to plot the gradient. Take out (or comment out) the lines

with(Physics[Vectors]):
Setup(mathematicalnotation= true):

Use these lines:

dV:= VectorCalculus:-Gradient(V, [x,y]):
plots:-fieldplot(dV, x= -2..2, y= -2..2, fieldstrength= log[10]);

There are many options to control the appearance, size, and relative size of the arrows. See help page ?plots,fieldplot for details.

First 166 167 168 169 170 171 172 Last Page 168 of 711