Carl Love

Carl Love

28070 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@seppe 

I can anticipate your next question: 

Question: If I have a cascade of evaluations, such as L:= [x[1,1]] where x is subsequently assigned an Array, how can I access the intermediate levels, i.e., the [x[1,1]]?

Answer: You pass to eval a level number as its second argument, as in eval(L,1)eval(L,2), etc.

My next Answer, which I'm posting forthwith, has several elaborate examples of this.

The same thing happens to me, very often. In particular, I get the same sans serif K and C that you show. Sorry, but I don't know how to correct it. If it's any consolation, it only affects the prettyprinted display of expressions, not their internally stored values, which you can see with command lprint.

It seems to go away if I completely shut down Maple and restart it. Since I very often have about 10 worksheets open simultaneously, I hate needing to shut down Maple.

@seppe I still think that you're missing it. Inside a procedure, the way to access the assigned value of a parameter t declared as ::evaln or ::uneval is eval(t), not evaln(t).

And here is the line from my previous answer where I said that:

  • In all these cases, the assigned value of the expression or name can be obtained inside the procedure as eval(t).

@waseem Waseem,

Is the Galerkin FEM the same thing as the variational FEM discussed in the papers by Gupta, et al, that we were discussing in another recent thread? And, if so, was the Matlab code being discussed here provided by them?

To begin with, you have too many initial and boundary conditions. There should be 8, and you have 12. There are several other issues, but I can't even begin to address them until you correct that.

@sand15 So, I suppose that you consider that my painstakingly crafted answers to the very long series of questions that you posed in your worksheet deserves no acknowledgement, let alone thanks or a vote up.

@seppe Please carefully reread my previous answer, because I had already anticipated your most-recent question, and I explicitly answered it.

Please let me know when you find the answer. And if you can't find it, I'll give more details.

@seppe It is true that in the vast majority of cases, "only the value is passed to the procedure", and the procedure never sees the associated name. To change this, you need to do it in the parameter declarations, like this:

NameOf:= proc(t::evaln) convert(t, string) end proc:
or, simpler,
NameOf:= (t::evaln)-> convert(t, 'string'):

If you want to require that t be assigned a particular type of object, such as an Array, you could make that

NameOf:= (t::evaln(Array))-> convert(t, string):

Analogous to the unevaluation quotes, if you don't even care whether there's an associated name, you could do

AsPassed:= (t::uneval)-> convert(t, string):

(It won't always be 100% exactly as passed because things called automatic simplifications will always be done: 1+1 will always be 2{2,1} will always become {1,2}, etc.)

In all these cases, the assigned value of the expression or name can be obtained inside the procedure as eval(t).

What you said about Diff is completely wrong. You can verify that by

x:= 3:
Diff(f(x,y), x);

You need to show me an example that made you believe what you said so that I can explain to you what's actually happening.

@tomleslie The variable x in the Matlab code is declared as type syms, i.e., symbolic. As far as I see, it's the only such variable. The one diff and the several ints are wrt x.

@Rohith This is yet another bug in Maple's 2D Input. I never use it (I use Maple Input (aka 1D input)), so I didn't know, but it's not surprising. I'm glad that you figured out a workaround. 

I just made a very small change to the most-recent code, so you should download it again. The change will not make any difference with the examples that we've worked on already; it's just in anticipation of the future.

It would help me to write an answer if I knew your perspective on this. Are you:

  • a calculus student who wants to learn how to do that limit problem?
  • a calculus student who knows how to do that limit problem but is exploring the possibilities of Maple?
  • a calculus instructor whose students are learning to do that problem?
  • something  else?

I've seen many of these nanofluid-related BVPs because they're one of the most-common sources of questions on MaplePrimes. This one seems overly simplified. Are you sure that you've entered the problem correctly into Maple? The equation f1 implies a nearly trivial relationship between between phi and theta, namely phi(y) = -Nt/Nb*theta(y) + C1*y + C2. Even ignoring the BCs, the pair of ODEs can be symbolically solved by dsolve to very simple elementary functions. It seems unlikely that there would be research-level interest in such simple equations. Are you missing a nonlinear term in f1?

Rouben's argument is solid to me: There is no nontrivial solution to the BVP as posed. That's mathematical fact, not Maple limitation.

@Christopher2222 The idea of partitioning (or dividing) the sector different ways is a purely theoretical exercise, a thought experiment. Any practical answer will be expressed via integration. Yes, there may be different means based on the variable of integration. If the variable of integration is meaningful (such as central angle, arclength, time (if a particle is moving along the ellipse)), then the resulting mean will be meaningful.

@Markiyan Hirnyk Indeed, the OP is also the author of the StackExchange Answer to which you referred.

Leo Brewin: It would be great if you would embed into this MaplePrimes thread a Maple example similar to what you did as a Mathematica example on StackExchange. In the MaplePrimes editor, look on the toolbar for a symbol like <>. That one lets you embed plaintext. And look for the green uparrow. That one lets you upload a PDF or Maple worksheet (and some other file types).

@bliengme 

Both of those options are much better than what you had: They both instantiate (i.e., replace it with another value) before using solve. Of those two options, I strongly prefer the second, because I prefer to never a make direct assignment to a problem's independent variable (t in this case).

There is nothing special about this value of tt = 1. You should call it something like t_final (corresponding to Tfinal), and assign its value at the beginning of the worksheet.

First 304 305 306 307 308 309 310 Last Page 306 of 709