PatrickT

Dr. Patrick T

2108 Reputation

18 Badges

16 years, 299 days

MaplePrimes Activity


These are replies submitted by PatrickT

@Joe Riel 

Good that you've found the problem. I experienced something like this with firefox a little while ago (I forget the details, but I couldn't log on to some places and had to use another browser to do that, much like your issue), and it turns out that it was some add-on I had installed which was interfering (it was some ad-blocker, but I forget which one exactly). So after clearing cookies the next place to look is interfence from add-ons.

what do you mean "solve for C"?

Below some hints that should get you started:

ode := diff(y(t),t) = (20-y(t))*y(t)/(10+y(t)) - C;
                     d         (20 - y(t)) y(t)    
             ode := --- y(t) = ---------------- - C
                     dt           10 + y(t)        
DEtools[odeadvisor](ode);
                         [_quadrature]
dsol := dsolve([ode,y(0)=y0]);

solve(1=rhs(eval(dsol,[y0=1])),C);
                          (1/2)           (1/2)
                 40 - 20 3     , 40 + 20 3     

Thanks Joe, oh that was rather simple, your answer comes just on time before I set off on the wrong path. I should have looked closer at the transformation in the minimal example. It was hard to see anything in the original problem, but I really ought to have spotted the issue here... Thanks.

Thanks Joe, oh that was rather simple, your answer comes just on time before I set off on the wrong path. I should have looked closer at the transformation in the minimal example. It was hard to see anything in the original problem, but I really ought to have spotted the issue here... Thanks.

indeed Christopher, it's been a long time since the last update. One thing that's been bugging me about the new system is that comments (such as this one) essentially disappear into the mapleprimes abyss after they've been written : they are not listed, they can't be upvoted, can't be made into favourites, basically they're not there.

indeed Christopher, it's been a long time since the last update. One thing that's been bugging me about the new system is that comments (such as this one) essentially disappear into the mapleprimes abyss after they've been written : they are not listed, they can't be upvoted, can't be made into favourites, basically they're not there.

copying your equations will be tedious, would you type this in editable maple input text

42000000000*diff(T(x,t)),t) etc.

so we can copy-paste the formulae, this is convenient for others and avoids copying errors too...

just a quick comment in passing, I haven't paid much attention to this thread, but a quick look, why do you compute the values of x and y and then use -1 and 1? maybe this is what you wanted:


sol := solve({a, b}, {x, y});
xsol := subs(sol,x);
ysol := subs(sol,y);
subs({x = xsol, y = ysol}, P);
                      xsol := 4.176478092
                      ysol := 0.6291094338
                          -0.73801315

and if not, ignore me.

just a quick comment in passing, I haven't paid much attention to this thread, but a quick look, why do you compute the values of x and y and then use -1 and 1? maybe this is what you wanted:


sol := solve({a, b}, {x, y});
xsol := subs(sol,x);
ysol := subs(sol,y);
subs({x = xsol, y = ysol}, P);
                      xsol := 4.176478092
                      ysol := 0.6291094338
                          -0.73801315

and if not, ignore me.

ah but with tracelast (thanks Edgardo for the suggestion) I can see why things are so much harder for Maple once the shift term is introduced, because the extra term appears in several places and gets dragged along at every step. With the change of variable suggested by Chini, by contrast, the shift term appears only in one place, which as it happens is trivial to integrate.

Is there a way to get more information about the details of the method used by dsolve --- here the Chini method? What I have in mind in particular is whether Maple could be made to show the change of variable used by Chini, namely:

tr := {y(x) = x^(1/(1-n))*u(x)};
PDEtools[dchange](tr,Kamke152,[u(x)]);

or is Maple not making that change of variable at all?

ah but with tracelast (thanks Edgardo for the suggestion) I can see why things are so much harder for Maple once the shift term is introduced, because the extra term appears in several places and gets dragged along at every step. With the change of variable suggested by Chini, by contrast, the shift term appears only in one place, which as it happens is trivial to integrate.

Is there a way to get more information about the details of the method used by dsolve --- here the Chini method? What I have in mind in particular is whether Maple could be made to show the change of variable used by Chini, namely:

tr := {y(x) = x^(1/(1-n))*u(x)};
PDEtools[dchange](tr,Kamke152,[u(x)]);

or is Maple not making that change of variable at all?

Thank you Edgardo, that's interesting and useful to know.

In the meantime I was able to get a friend to scan the relevant page from Erich Kamke's book. I had no luck with Google books, but I did learn there that Kamke wrote his famous book Differentialgleichungen, etc. (there seems to be at least three related volumes) after being forced to retire by the nazis for refusing to divorce his Jewish (albeit converted) wife.

It seems impossible to find the original contribution by Chini. It's dated 1925 and surely no longer copyrighted, so if anyone has a copy it would be great to post it somewhere. At any rate, on page 302, a change of variable is shown which greatly reduces the original equation. Once you see it, it looks obvious. It's easier to do the calculations by hand than with Maple, but after some fiddling one can get pretty close:

tr := {y(x) = x^(1/(1-n))*u(x)};
PDEtools[dchange](tr,Kamke152,[u(x)]);
simplify(%/x^(1/(1-n))) assuming positive;
solve(%,diff(u(x),x));
collect(x*%,u(x), factor);
newKamke152:= x*diff(u(x),x) - % = 0;


                        /        /  1  \     \
                        |        |-----|     |
                       <         \1 - n/      >
                 tr :=  |y(x) = x        u(x)|
                        \                    /
     /  1  \                                               n
     |-----|         /  1  \                / /  1  \     \
     \1 - n/         |-----|                | |-----|     |
    x        u(x)    \1 - n/ / d      \     | \1 - n/     |
    ------------- + x        |--- u(x)| = a \x        u(x)/
      (1 - n) x              \ dx     /                     

            /  n  \
            |-----|
            \1 - n/
       + b x       
               / d      \     / d      \                  
        u(x) + |--- u(x)| x - |--- u(x)| x n         n    
               \ dx     /     \ dx     /       a u(x)  + b
      - ------------------------------------ = -----------
                     (-1 + n) x                     x     
                    n         n                   
             -a u(x)  + a u(x)  n - b + b n + u(x)
             -------------------------------------
                          (-1 + n) x              
                       u(x)          n    
                      ------ + a u(x)  + b
                      -1 + n              
                    / d      \      u(x)          n        
     newKamke152 := |--- u(x)| x - ------ - a u(x)  - b = 0
                    \ dx     /     -1 + n                  

The transformed equation can then be solved. The transformation works equally well with the forcing function shifted by a fixed amount s, and thus:

newKamke152shifted := (x-s)*(diff(u(x), x))-u(x)/(-1+n)-a*u(x)^n-b ;
infolevel[dsolve]:=5:
ODETools[odeadvisor](newKamke152shifted);
dsolve(newKamke152shifted,u(x));
                          [_separable]
Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
trying Bernoulli
trying separable
                /  /u(x)                                      \
   ln(-x + s)   | |                       1                   |
 - ---------- + | |      - ------------------------------- d_a|
     -1 + n     | |                  n       n                |
                \/         -_a + a _a  - a _a  n + b - b n    /

    + _C1 = 0

This time Maple has no problem integrating. So Edgardo you're probably right that Maple gets into a tangle while trying to simplify terms.

EDIT: P.S. The odd thing is that the "shift" s in the forcing function appears in the easy part of the solution and not in the complicated integral...

Thank you Edgardo, that's interesting and useful to know.

In the meantime I was able to get a friend to scan the relevant page from Erich Kamke's book. I had no luck with Google books, but I did learn there that Kamke wrote his famous book Differentialgleichungen, etc. (there seems to be at least three related volumes) after being forced to retire by the nazis for refusing to divorce his Jewish (albeit converted) wife.

It seems impossible to find the original contribution by Chini. It's dated 1925 and surely no longer copyrighted, so if anyone has a copy it would be great to post it somewhere. At any rate, on page 302, a change of variable is shown which greatly reduces the original equation. Once you see it, it looks obvious. It's easier to do the calculations by hand than with Maple, but after some fiddling one can get pretty close:

tr := {y(x) = x^(1/(1-n))*u(x)};
PDEtools[dchange](tr,Kamke152,[u(x)]);
simplify(%/x^(1/(1-n))) assuming positive;
solve(%,diff(u(x),x));
collect(x*%,u(x), factor);
newKamke152:= x*diff(u(x),x) - % = 0;


                        /        /  1  \     \
                        |        |-----|     |
                       <         \1 - n/      >
                 tr :=  |y(x) = x        u(x)|
                        \                    /
     /  1  \                                               n
     |-----|         /  1  \                / /  1  \     \
     \1 - n/         |-----|                | |-----|     |
    x        u(x)    \1 - n/ / d      \     | \1 - n/     |
    ------------- + x        |--- u(x)| = a \x        u(x)/
      (1 - n) x              \ dx     /                     

            /  n  \
            |-----|
            \1 - n/
       + b x       
               / d      \     / d      \                  
        u(x) + |--- u(x)| x - |--- u(x)| x n         n    
               \ dx     /     \ dx     /       a u(x)  + b
      - ------------------------------------ = -----------
                     (-1 + n) x                     x     
                    n         n                   
             -a u(x)  + a u(x)  n - b + b n + u(x)
             -------------------------------------
                          (-1 + n) x              
                       u(x)          n    
                      ------ + a u(x)  + b
                      -1 + n              
                    / d      \      u(x)          n        
     newKamke152 := |--- u(x)| x - ------ - a u(x)  - b = 0
                    \ dx     /     -1 + n                  

The transformed equation can then be solved. The transformation works equally well with the forcing function shifted by a fixed amount s, and thus:

newKamke152shifted := (x-s)*(diff(u(x), x))-u(x)/(-1+n)-a*u(x)^n-b ;
infolevel[dsolve]:=5:
ODETools[odeadvisor](newKamke152shifted);
dsolve(newKamke152shifted,u(x));
                          [_separable]
Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
trying Bernoulli
trying separable
                /  /u(x)                                      \
   ln(-x + s)   | |                       1                   |
 - ---------- + | |      - ------------------------------- d_a|
     -1 + n     | |                  n       n                |
                \/         -_a + a _a  - a _a  n + b - b n    /

    + _C1 = 0

This time Maple has no problem integrating. So Edgardo you're probably right that Maple gets into a tangle while trying to simplify terms.

EDIT: P.S. The odd thing is that the "shift" s in the forcing function appears in the easy part of the solution and not in the complicated integral...

nice Robert, thanks for sharing,

this game of punches reminds me of this game of kicks, penalty kicks:

http://pricetheory.uchicago.edu/levitt/Papers/ChiapporiGrosecloseLevitt2002.pdf

it looks like a limitation in the use of labels (rather than a bug), but I'm not entirely sure how to interpret the meaning of "last output" in the following:

http://www.maplesoft.com/support/help/Maple/view.aspx?path=worksheet/expressions/equationlabels

 

Equation labeling allows you to reference Maple output in math areas of your worksheet. The label is associated with the last output within an execution group and with all of the input in the execution group.

I don't use labels and your experience doesn't make me want to try them!

slightly related to the theme of your post, I found this interesting:

http://www.mapleprimes.com/posts/89983-Assume-Vs-Assuming

First 19 20 21 22 23 24 25 Last Page 21 of 93