Carl Love

Carl Love

28055 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@Carl Love I just reran the Lie solution, and now I got something completely different! (I'm sorry about the plaintext format below. MaplePrimes doesn't let me display worksheets.)

restart;
dsolve(x^3*diff(y(x),x)^2+x*diff(y(x),x)-y(x) = 0,y(x),'Lie');
        1  /      /      24           21            18
y(x) = --- \RootOf\_C1 _Z   + 8 _C1 _Z   + 16 _C1 _Z  
       4 x                                            

              15             12             9             6
   - 32 _C1 _Z   - 160 _C1 _Z   - 128 _C1 _Z  + 256 _C1 _Z 

               3        4          \   /      /      24
   + 512 _C1 _Z  - 256 x  + 256 _C1/^3 \RootOf\_C1 _Z  

             21            18            15             12
   + 8 _C1 _Z   + 16 _C1 _Z   - 32 _C1 _Z   - 160 _C1 _Z  

               9             6             3        4          \ 
   - 128 _C1 _Z  + 256 _C1 _Z  + 512 _C1 _Z  - 256 x  + 256 _C1/^

       \\  
  3 - 2//, 

                                     (1/3)                    
      (4/3) /                  (1/2)\                    (1/2)
  y(x)      \1 + (1 + 4 x y(x))     /      (1 + 4 x y(x))     
  ------------------------------------------------------------
                             (1/3)                            
   /                   (1/2)\      /              (1/2)    \  
   \-1 + (1 + 4 x y(x))     /      \(1 + 4 x y(x))      + 3/  

                                                 (1/3)        
                  (4/3) /                  (1/2)\             
            3 y(x)      \1 + (1 + 4 x y(x))     /             
   - ---------------------------------------------------------
                               (1/3)                          
     /                   (1/2)\      /              (1/2)    \
     \-1 + (1 + 4 x y(x))     /      \(1 + 4 x y(x))      + 3/

   - 

                                       (1/3)                    
        (1/3) /                  (1/2)\                    (1/2)
  2 y(x)      \1 + (1 + 4 x y(x))     /      (1 + 4 x y(x))     
  --------------------------------------------------------------
                             (1/3)                              
   /                   (1/2)\      /              (1/2)    \    
   \-1 + (1 + 4 x y(x))     /      \(1 + 4 x y(x))      + 3/ x  

                                                  (1/3)         
                   (1/3) /                  (1/2)\              
             6 y(x)      \1 + (1 + 4 x y(x))     /              
   + -----------------------------------------------------------
                               (1/3)                            
     /                   (1/2)\      /              (1/2)    \  
     \-1 + (1 + 4 x y(x))     /      \(1 + 4 x y(x))      + 3/ x

   - _C1 = 0


 

The Lie soluton is a bit uglier to me than the implicit one in that it contains the square of a degree-8 RootOf. It's not horrible though. 

 

@Preben Alsholm Vote up. This was also my immediate first guess for something worth trying. So it's probably worth trying in any case where the solve returns explicit solutions (i.e., without RootOf).

@ecterrab Thus, it follows that a likely next thing to try is dsolve(..., implicit), and indeed that works.

This is the appropriate place to discuss MaplePrimes problems. That's why there's a "MaplePrimes" entry in the Question-header "Product" check boxes. 

Additional details: I have two computers---both Windows 10, but different versions---and I have this problem on both. For both, the browser I use for posting is Google Chrome.

@nm If your guess is correct, then I've been extraordinarily unlucky. Like I said, I haven't been able to display any worksheet at all for about a year although I've tried many times.

@Ronan The approach that you show is a last resort for infinite sums for which evalf won't work. Vv's Answer shows that that isn't the case here.

Vote up. But due to the presence of LinearAlgebra in your title, I'd like to clarify something that may not be obvious to all readers: Your examples display the same (whether via Latex or GUI) regardless of whether they are created with LinearAlgebra. Indeed, many users have the false impression that LinearAlgebra is required to use Vector or Matrix. No, those are top-level commands.

I think that one of the examples that you present should be condidered a bug, just for the sake of consistency.

I dispute your contention that the returned by boo is local to boo because of this:

restart;
foo:=module()
   export n::integer:= 2;
   export boo:=proc()::integer;
     return n;
   end proc;       
end module
:
foo:-boo();
                               2

Also consider this:

restart:
foo:= module() export n; end module:
type(foo:-n, `local`);                
                              true

So, it is the presence of the ::integer that makes the difference.

@tomleslie The last algorithm that you show impressively exploits the problem's sparsity. There was an efficiency problem with your Maple implementation, for which I've given a correction in my Answer. Nonetheless, I wanted to directly congratulate you here for coming up with a great algorithm, which is the most difficult creative aspect.

@emendes 

Since the vast majority of the cputime used for this computation by all the methods shown so far is for the garbage collection, and given that Maple's garbage collection is already parallelized, it might be worthwhile to increase that parallelization. Please redo with SubsetPairsSparse the timing of one of the large computations that you've already shown with this one change: Before starting the timing, give this one command:

kernelopts(gcmaxthreads= kernelopts(numcpus));

@vv Maple has a massive and very efficient infrastructure for doing set problems such as this one. To write this efficiently in a compiled language such as C would require far more effort than "reinventing the wheel". Note that for all the large computations posted here, the majority of the time is in garbage collection, which is automatically parallelized in Maple. 

@Preben Alsholm 

Vote up.

I'd like to point out to the OP that the mathematical and computational essence of what you just said is the same as what I said. Of course, you've also given a detailed example. 

@Robert Matlock 

I apologize that the rhetoric of my comment was flippant; however, I stand by its mathematical and computational content 100%.

I have read and fully understood what you wrote as well as all previous MaplePrimes posts on this subject, and I've used those techniques many times, both for IVPs and BVPs. My comments here apply only to the case of evaluating the highest-order derivatives that actually appear in the system, not to other derivatives or integrals. There does not exist a more-accurate way (i.e., a way with more error control) to numerically evaluate those derivatives than direct numeric evaluation of the necessarily-already-present symbolic expressions that specify those derivatives. The error control built in to the numerical arithmetic evaluators (evalf, etc.) is already necessarily at a higher precision than that used by dsolve.

It was the truth (and, to me at least, the obviousness) of the "necessarily" in that last sentence (as well as a toothache and lack of sleep) that led to the flippancy of my previous Reply.

@Robert Matlock Suppose that dsolve did provide the highest-order derivative in its output. By what magic process would it compute that other than the way that we're describing to you? 

First 145 146 147 148 149 150 151 Last Page 147 of 709