Carl Love

Carl Love

28035 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@vv You wrote:

  • For an abelian group, ... if the order is even, the product (of the elements) may be <>1. 

I think that your "may be" can be strengthened to "is". Isn't the product necessarily equal to the unique nonidentity element that is its own inverse (such as -1)?

@Alex0099 To correct the "Error, unterminated loop", you need a semicolon at the end of the line tmp:= RHS(x)*pn(i, 1, t).

@ijuptilk What I gave you is only the code for the procedure definition of simple_deflate. To get results, you need to apply it to arguments, as in simple_deflate(A[6], u). To do that, you need the vector u. The top of the first page of your PDF excerpt shows that u is constructed from w. How to get w is presumably on an earlier page of the PDF. If you show the part of the PDF that explains how to get w, I can probably condense the entire algorithm to 2 or 3 lines of code.

@ijuptilk There is some invisible invalid character(s) in the whitespace at beginning of the 2nd line of simple_deflate. If I backspace over the whitespace (including the line break) and then reinsert it, then it works.

@ijuptilk Please post a worksheet showing the error as an attached file. Use the green up arrow on the toolbar of the MaplePrimes editor.

@ijuptilk Your problem is likely caused by the lines "Approximate eigenvalues" and "Precise eigenvalues". These lines are comments and you're treating them as code. To keep these lines, use # to tell the parser that they are comments:

#Approximate eigenvalues
#Precise eigenvalues

@ijuptilk The procedures pindex and simple_deflat from the PDF can both be replaced by this simple procedure:

simple_deflate:= (A::Matrix, u::Vector)->
    (p-> A-u.A[p]/u[p])(max[index](abs~(u)))
:

This code also addresses the "ill-conditioning" issue mentioned in the last line of the PDF by selecting the entry of maximal absolute value rather than any nonzero entry.

If your Maple version is too old to have max with the index option, let me know, and I can modify the above. You'd be able to tell immediately from the help page ?max.

@Earl Yes, Kitonum's Answer assumes a uniform density of 1. Regardless of whether the density is uniform, it can be accounted for by including it as a factor of the integrand in all of the integrals (2 for the center of mass and 1 for the moment of inertia). If that factor is constant (uniform density), it can be pulled out of the integrals. The dimensions of moment of inertia are mass*length^2.

@mnovaes The command subs has much more general uses than substituting values for variables. It can substitute any expression for any other expression provided that the expression being searched for exists as a distinct entity within the expression being modified. I fairly often substitute one number for another. About half of the time that I do this, the number that I want to change is represented by a variable. If subs treated x as a plain name in the following code, then I wouldn't be able to do that number changing:

x:= 3:
subs(x= 4, 3);

Maple can generate a "series" solution for your ODE, meaning the exact values of any finite number of leading terms of something akin to a power series for b(x). Specifically, it returns _C1*P1(x) + _C2*P2(x) + _C3*ln(x)*P3(x) + P4(x) where the _Care constants of integration and the Pk are power series with rational coefficients truncated to some finite order that you can specify.

Order:= 20: #desired truncation order
dsolve(
    diff(b(x),x$3)/2 + diff(b(x),x$2)/x + 
        2*diff(b(x),x)/(x^2+1)^2 - 4*x*b(x)/(x^2+1)^3, 
    b(x), series,
    x= 0 #expansion point (any complex number or `infinity`)
);

Order:= 6: #reset to default value

There are other cases where it's possible to get a "formal series" solution, meaning explicitly expressed as infinite sums, but I can't do it with this ODE, despite the fact that the reformulated ODE is homogenous and linear with integer polynomial coefficients.

@Angie7 In the 2nd of my 3 answers, change x(1) to D(x)(1).

I deleted your earlier version of this Question. I see many errors in your code, but I'm on my phone (no Maple) right now. I'll Answer soon if someone else doesn't get to it first. The command fsolve is very good with numeric polynomials.

Please post a worksheet showing the error. I can probably fix the error, but my knowledge of ADM (Adomian Decomposition Method) is limited to this Wikipedia page "Adomian Decomposition Method". There is a good and rather throrough example on that page of solving a nonlinear BVP with a boundary condition at infinity. See the section on the Blasius equation. The BVP is

diff(u(x), x$3) + u(x)*diff(u(x), x$2)/2 = 0, u(0)=0, D(u)(0)=0, D(u)(infinity)=1

@vv I am not advocating ignoring the userinfo from the 1st call. But, the OP definitely wants that info from the 2nd call only. The purpose of this Answer is to show that it's efficient to repeat the dsolve to achieve that.

@nahid200 Sorry, but I still don't understand it. I understand everything below the phrase "For this purpose", but I don't understand the little bit above that phrase. In particular, having two non-integer arguments makes no sense to me. Furthermore, note that there's nothing in your box below that phrase about B having two arguments, nor are the Greek letters zeta or gamma used in that paragraph.

You wrote:

  •  it works for  n,m=1,2,3..., but doesn't work for n=0.1,0.2,0.333, and m=0.1,0.2222,0.44

Yes, that's totally 100% obvious---so obvious that it's nearly ridiculous that you wrote it out. It makes absolutely no sense to me for n and m to be anything other than positive integers. That's not a limitation of Maple; it's just common sense.

Perhaps you could cite some reference material that I could look up about this?

The version of procedure with 16-lines of code in your most-recent Reply does the same thing as the 7-line version from your Reply before that. The extra lines do nothing other than waste time and make the code confusing. Stick with the 7-line version.

I asked you two other questions In my previous Reply that you haven't answered:

  • one about the starting values of and k;
  • one about spline versus linear.

Anything that you can say about these questions, even if it's only a little bit true, will help me understand. 

In all future postings, please mark off very clearly anything, including code, that you're quoting from another source. This has nothing to do with copyright or intellectual honesty; it just helps me to understand what you don't understand so I can figure out an approach to explaining it to you.

First 98 99 100 101 102 103 104 Last Page 100 of 708