Carl Love

Carl Love

28035 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@tomleslie Nomenclature: If the system contains a dependent variable without any of its derivatives, then it's a DAE system, not an ODE system. When dsolve(..., numeric) is passed a DAE-IVP system, and no method is specified, then it chooses a DAE-specific method. It's not as if the non-classical ODE-IVP methods work on DAE-IVPs. For example, if you take your toy system dsys and do dsolve(dsys, numeric, method= rkf45), then you'll get exactly the same error message that you got for classical[rk4].

 

@vv Okay, I can provide alternate, elementary versions in many cases for future Answers, especially when the elementary version is shorter.

Here's documentation for my Answer above:

`&||`:= (R::seq(algebraic))-> `if`(nargs=0, infinity, 1/`+`(1/~R))

1. `&||`: Infix operators are usually defined by assigning a procedure to a name beginning with (see ?&). Maple allows any sequence of characters, no matter how weird, to be a name. If it's weird it needs to be enclosed in the quotes shown (see ?name). &-operators do not need the quotes when they're invoked, only when they're defined.

2. (R:: ... ): I am using the arrow-expression (aka lambda expression) form of procedure definition. If there are multiple parameters or parameters with type restrictions, then the parentheses are required. 

3. R::: When a parameter name is followed by a double-colon, the part following the double-colon is a type restriction for the parameter.

4. seq: This indicates that the will represent a sequence of arguments of arbitrary length (including lengths 0 and 1).

5. (algebraic): The arguments will be restricted to type algebraic, which means all familiar mathematical expressions, including unassigned names, both algebraic and transcendental numbers, both algebraic and transcendental functions, and combinations thereof formed with arithmetic operators (see ?algebraic).

6. `if``if` is a three-argument built-in function. Since if is also a reserved word, it needs to be in back quotes if used as a function name (an alternative name for this function is ifelse, which requires no quotes). The first argument is a condition that evaluates to true or false; if true, the second argument is returned; if false, the third.

7. nargs: This is a keyword that can be used inside procedures to refer to the count of their arguments.

8. ​​​​​​infinity: This is a predefined constant, meaning what you'd expect.

9. `+`( ... ): Ordinary addition of an arbitrary number of addends: If an ordinary infix operator can be meaningfully used with an arbitrary number of operands, then that's done by enclosing its symbol in back quotes and using it with parentheses as a function.

10. /~: An infix operator can be made to operate elementwise (i.e., it can be applied to a arbitrary sequence of operands) by following its symbol with ~. So, 1/~R means 1/R[1], 1/R[2], ..., 1/R[nargs].

I guess that your Question boils down to Does this command have any undocumented features? Very often that question can be answered by reading through the Maple code; however, this command has compiled external code, so reading it is not possible for an end user.

The help page says that xml is the default, not "none".

Bravo for having the courage to post this!

You said "5 sucessful women from within the community". To which community do you refer: your locale (Waterloo//Kitchener), or a more tech- or perhaps even math-oriented community?

@vv This is an associative operator with identity (infinity) (and less significantly, it's also commutative). The Maple tradition (and I think that it's a good tradition) is that associative infix operators with identity can be used in prefix functional form with an arbitrary number of arguments, and with 0 arguments giving their identity. Examples are `+``*`, `.``@``union``and``or`. Everyday I do something with some operator's functional form that simply cannot be conveniently done with its infix form (such as applying it to a number of arguments that's not precisely known at the time that the code written). It seems quite likely that one would want to do that with the harmonic sum, which is used for many more applications that just resistors. Now, if I'd extended your 1/4-line of code to 10 lines of code, I'd maybe call that "overkill". But I only extended it from 1/4-line to 1/2-line.

Note that since Maple 2018, &-operators can be used in functional form without quotes, making those functional forms two characters more convenient.

What happened to the related Question about the matrix system for this same ODE? I just completely answered the question about how to get Maple to generate the matrix, and now the whole thread is gone!

Would someone with the power please restore that thread? 

@suvetha2000 You plots and symbolic solutions were correct, but your eigenvalues were not. You just copied the same matrix for all four cases---obviously that's wrong. Hopefully my Answer has given you some insight into computing eigenvalues. Don't use linalg for this or for anything else. Those commands were long ago replaced by more modern ones. Use the commands that I showed.

There are subtle differences between plots a and b and between c and d; none of the four are the same. The general shape and direction of these plots (often called phase portraits) can determined just from the signs and real/imaginary status of the eigenvalaues, and experts usually look at the eigenvalues first.

@suvetha2000 The matrix that you show in your Question---which is also the matrix that I used in my Answer---is correct. Off the top of my head, I don't know of a stock pre-coded method for reducing a high-order linear ODE to a first-order system in matrix form. I will see if I can find something though. There are a vast number of obscure commands (in DEtools and PDEtools) for manipulating ODEs.

So, you have a Normal distribution with mean 10 and standard deviation mu? That's pretty weird; is that what you really want?

@suvetha2000 Yes, that was the impresssion that I got from the instructions. But if you know how to do it in Maple also, then you can check your by-hand work.

@Christopher2222 Without me reviewing the whole thread, this is what I guess is happening: If you do this SVD trick on an n x m matrix, it's still an n x m matrix, it just has a much higher level of redundancy (or, equivalently, it has a much lower rank). But it still has n*m entries, so there's no savings if it's saved as a rectangular matrix. Try running a standard compression program, such as "zip", on both the SVD'd file and the original.

@Carl Love Here's my one-line minimal-arithmetic while loop. This uses Maple 2019 syntax:

{((b,a):= (0,1)), (while (s:= a+b) < 10000 do (a,b):= (s,a); if issqr(a) then a fi od)};

It was proven in 1964 that the only square Fibonacci numbers are 0, 1, and 144. See: Cohn, JHE (1964), "Square Fibonacci Numbers etc", Fibonacci Quarterly2: 109-13. The proof there is not exceedingly difficult.
 

@Stretto Regarding "collecting" on the strings: In my Answer, I provided a method for the mathematical evaluation (through the value command) of the colored output. Acer also gave a similar method. If that's not sufficient for your needs, then you'll need to be more explicit about what you mean by "collecting". The key component of these evaluations is the command Typesetting:-Parse

@suvetha2000 Apology accepted, and I'm available if you want to continue working on this problem.

I figured it out! The axis order is set by the DEplot3d command. Where you have [z(t), y(t), x(t)], you should make it [x(t), y(t), z(t)]

First 215 216 217 218 219 220 221 Last Page 217 of 708