Carl Love

Carl Love

28070 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@nm Include the discont option in the plot.

@Bendesarts wrote:

The system is a ODE with 15 parameters and many trigonometric function for the coefficients. It's big but for a a mechanical system a bit complex is not huge.

One point which makes the system looks like very big comes from the fact that i have copy the matrix with copy/paste for my code where i have applied machanical theorem so as to obtain the equations. When you do like this, the copied matrix are good but they looks likes with a strange form which takes a lot of place.

My assessment of the size of the system is based purely on the length command and not on the visual appearance of your matrices. The length of 2 Gig means that if the system were printed out, it would be nearly 1,000,000 pages long. The complicated expressions are the result of the inversion of 12 x 12 symbolic matrices.

I have a feeling that there is some way to solve the differential system first and then invert numeric matrices. But I don't know exactly how to do it.

I notice that problem 2 is now fixed. I haven't checked #4.

I've discovered several more bugs:

  1. While editing a Reply, I clicked Preview. The Preview is shown, but then you're stuck---pressing Submit, Preview, or Cancel does nothing.
  2. Replies (not Answers) to a Question are not necessarily listed in chronological order. See the thread http://www.mapleprimes.com/questions/200004-Creating-A-Smooth-Curve-From-Data-Points
  3. Output from uploaded worksheets does not display correctly.
  4. Using a question mark in the editor to create a hyperlink to a help page does not work.
  5. When converting an Answer into a Comment, the Answer's Replies are deleted. They should be carried over as additional Comments.

@Deltafee Please upload your worksheet so that I can diagnose the problem. Here's my doing of it:

 

Data:= [[.158, 0.2e-1], [.159, 0.2e-1], [.161, 0.3e-1], [.164, 0.3e-1], [.166, 0.3e-1], [.169, 0.4e-1], [.173, 0.6e-1], [.178, 0.8e-1], [.185, .1], [.187, .11], [.193, .14], [.2, .19], [.21, .28], [.223, .38], [.233, .44], [.244, .58], [.256, .82], [.278, 1.4], [.281, 1.71], [.282, 1.78], [.282, 1.78], [.282, 1.81]]:

X:= Data[..,1]:

Y:= Data[..,2]:

f:= a+b*x^c+d*x^e:

Statistics:-NonlinearFit(f,X,Y,x);

 

 

Download NonlinearFit.mw

Your system is so large that I don't think that there's much hope for dsolve being able to handle it. The size of sys as measured by length({sys}) is over 2 Gig. That's so large that the length command itself takes several seconds to finish.

@acer How much of the computation of evalf(3/Pi, 1) is done in evalhf? Is it just the numeric evaluation of Pi?

@ecterrab My opinion is that it is an improvement---above and beyond the call of duty.

@Deltafee It should be

sol[1]:= Statistics:-NonlinearFit(f, xlist, ylist, x);

This is only a partial explanation: Since Digits is less than 16, the computation evalf(3/Pi, 1) is done in hardware double precision (evalhf mode). This makes it harder to see what's going on, because the debugger shows nothing. That being said, I consider the 0.9 result a bug.

@danlun I was not suggesting that my code

(expand@@2)~(expr1);

was a means to simplify your expression. It was a side-comment only relevant to Markiyan's code.

@Christopher2222 "...powers of cos(x)...."

@nm Perhaps one can get a numeric solution from dsolve after converting to a differential equation (if the conversion is possible). Even for symbolic solution, dsolve can solve many nonlinear equations, and is much more powerful than intsolve.

@Markiyan Hirnyk wrote:

map(proc (c) options operator, arrow; expand(c) end proc, op(expr1)):
map(proc (c) options operator, arrow; expand(c) end proc, op(map(proc (c) options operator, arrow; expand(c) end proc, op(expr1))));

These steps are not valid transformations! The op causes a drop of all factors or terms other than the first. Indeed, your final answer is just the first term of the expansion of a subpart of the original expression. If you take out the ops, it is valid, and it is equivalent to simply

(expand@@2)~(expr1);

or

map(expand@@2, expr1);

I notice that problems 1 & 3 have been fixed today. I haven't had a chance to verify 2 & 4.

@Markiyan Hirnyk The source of the error is competely different in this question.

First 595 596 597 598 599 600 601 Last Page 597 of 709