Carl Love

Carl Love

28100 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@Kitonum 

I admire your diligence in going through so many steps to post a neat expression to MaplePrimes. I don't think that I have the patience for that.

If you're going to be using the green arrow anyway, why not just upload a worksheet??

@nm 

Note that Maple stores a product-with-denominator P:= (a*b)/(c*d) as '`*`'(a, b, 1/c, 1/d), so a*b is a "subproduct" of P, but c*d is not. That is why your algsubs did not work. But 1/(c*d) is a subproduct, which is why Kitonum's worked.

I find algsubs unpredictable; the documentation is not clear. How do you know that algsubs(1/(a*b)= U, B) will not replace a*b with 1/U? I guess that you can't be sure until you see that there are no Us in the final expression.

@Kitonum 

How did you put your expression into your MaplePrimes post? Your expression is exactly the same as mine, which was cut-and-paste, yet yours is so much neater (and blue).

I asked you this before, but you did not answer: ARE THEY LINEAR EQUATIONS? Is some significant subset of them linear?

I'm warning you: People in this group generally do not take kindly to repeated Questions. Posting a followup Reply to your earlier Question puts it at the top of the Active Conversations list, so you do not gain any extra visibility by re-asking the Question. All it does is make angry the people who might answer your Question.

@kyleevanslee 

Applying my technique to a system with 11^2 variables is not at all feasible; there are far too many possibilities. However, if it could be done, then it'd be fairly easy to divide the solutions into equivalence classes in the way that you said.

@tira 

Okay, I read your PDF, which is simply a transcript of a Maple worksheet. (By the way, why couldn't you simply upload the Maple worksheet itself?) In it, you successfully use pdsolve(..., numeric) to solve a system of two PDEs. What do you mean by "not change the sign of my equations"? I don't see any sign change. In other words, I'd be better able to help you if you would provide an example of pdsolve NOT working for you.

All I need to execute your worksheet are the four values of Gr that you used, which you stored in L. Please supply those values.

And please try uploading that Maple worksheet.

I don't see any attached file. Also (and this may my personal preference), I hate Word files. Please find some other format. Maple would be best; it can be used as a document editor. It's not the best mathematical editor, but it's better than Word. You have Maple, right? Why else would you be posting your question here?

I also find that Ctrl-Del deletes anything in a worksheet easily. No selecting needed; no mouse motion needed. If it doesn't work for you, check if your NumLock is superceding your Del. This is what I use for 99% of my deleting. I just keep the keys held down for a large block delete.

To get a high-precision integral, use the third technique from my Answer, the one where the integrals are computed by dsolve, and set the abserr option to dsolve. If your Digits is not large enough, then dsolve will return an error with a suggested value of Digits.

restart:
Digits:= 20:
So:= dsolve([
     -1.2*diff(y(x), x$2)+0.8*y(x) = 2, y(0)=1, y(1)=0,

     diff(u(x),x) = y(x), u(0)=0,
     # So u(x) = int(y(t), t= 0..x).

     diff(u2(x),x) = y(x)^2, u2(0)=0
     # So u2(x) = int(y(t)^2, t= 0..x).

     ], [y(x), u(x), u2(x)],
     'numeric', 'output' = listprocedure, abserr= 1e-20
):

Error, (in dsolve/numeric/BVPSolve) precision is insufficient for required absolute error, suggest increasing Digits to approximately 23 for this problem

So, I set Digits:= 23 and redid the exact same dsolve command, which returned without error. Then,

So(1);

@Konstantin@ 

It can't be simpler to write your own numerical integration procedure!

We need to get to the bottom of why this isn't working for you. I just tried in Maple 18.02, and all three solutions work fine for me (with Digits <= 15). Have you tried the third technique that I posted, the one where dsolve does all the work?

What is your setting of Digits? I've noticed that if I set Digits to 20, then I have the same problem that you are having: The integral for the square returns unevaluated. This is understandable: You should not be able to get the answer to a higher precision than the precision of dsolve's numeric procedure (which is, in general, lower than the Digits setting). So use that third technique that I posted, which is numerically robust. Or add the epsilon argument to the integral to reduce the precision:

evalf(Int(u^2, 0..1, epsilon= 1e-10));

 

I just added a third, completely different, solution technique to my Answer above. It has often been argued here at MaplePrimes that this is the most numerically robust technique.

@Konstantin@ 

Hmm. It worked for me, although I did not show my output in my Answer. What version of Maple are you using? I used Maple 16. I will test in Maple 18 now.

I just added an additional, alternative solution to my Answer. Does that one work for you?

You can use TypeTools:-GetTypes() to see which types are loaded.

@Markiyan Hirnyk 

My guess is that the simplification is easier to obtain when it is rational. Compare

e:= sqrt(sqrt(a)-sqrt(b))*sqrt(sqrt(a)+sqrt(b)):
e1:= eval(e, [a=26, b=10]):
evala(e1);

and

e2:= eval(e, [a=16, b=6]):
evala(e2);

@jonlg 

You need to take the transpose of the Array before passing it to LeastSquares. But note that LeastSquares will work with the listlist form; you do not need an Array.

A:= [1,2,3]: #lists
B:= [4,5,6]:
C:= zip(`[]`, A, B): #listlist form
CurveFitting:-LeastSquares(C, y);

C:= <Array(A),Array(B)>:
CurveFitting:-LeastSquares(C, y);

Error, (in CurveFitting:-LeastSquares) data points not in recognizable format


CurveFitting:-LeastSquares(C^%T, y);  #C^%T is the transpose of C.

But if you use columns Vectors instead of Arrays it's different:

A:= <1,2,3>:  B:= <4,5,6>: #Column vectors.
C:= <A|B>: #Note: <A|B>, not <A,B>
CurveFitting:-LeastSquares(C, y);

It's subleties like these that lead me to advise you again: First master the use of lists; then we'll discuss Arrays when your need arises.

 

First 515 516 517 518 519 520 521 Last Page 517 of 709