Question: dsolve,chinisol constant invariant found but integration hangs


I am searching for an analytical solution, if one exists, of a first-order differential equation of the Chini type, which is a generalization of the Abel type. The equation I'm trying to solve is very closely related to one presented in Maple's help files and which does admit an integral representation, namely the equation reported by Kamke as number 152 (according to the reference given in Maple). The equation I'm grappling with is similar to Kamke152 but with the forcing function shifted. It looks like Maple knows how to integrate it, but then it hangs.

Here is Kamke's equation number 152, with its solution.

Kamke152 := diff(y(x), x) = a*y(x)^n+b*x^(n/(1-n)):
ODETools[odeadvisor](Kamke152);
                  [[_homogeneous, class G], _Chini]
dsolve(Kamke152,y(x));
-Int(1/((a*x*(-1+n)*_a^n+_a)*x^(n/(-1+n))+b*(-1+n)*x)*x^(n/(-1+n)),_a = _b .. y(x))*(-1+n)+ln(x)-_C1 = 0

Here is the equation with the forcing term shifted by a fixed number s.

Kamke152shifted := diff(y(x), x) = a*y(x)^n+b*(x-s)^(n/(1-n)):
ODETools[odeadvisor](Kamke152shifted);
        [[_1st_order, _with_linear_symmetries], _Chini]

infolevel[dsolve]:=5:
DEtools[chinisol](Kamke152shifted,y(x));
trying Chini
Chini's absolute invariant is: a^(-n-1)*(b*(x-s)^(-n/(-1+n)))^(-2*n+1)*(a*b*(x-s)^(-n/(-1+n))*n/((-x+s)*(-1+n)))^n*n^(-n)
Warning,  computation interrupted

The call above hangs and no solution is produced. However, by setting infolevel to 5, one can read "Chini successful." It can be verified directly that the invariant is indeed constant, implying that the equation is integrable. However, no solution is returned.

Maple can solve special cases without hanging, e.g. the Riccati case n=2:

Kamke152shifted2 := eval(Kamke152shifted, n = 2):
ODETools[odeadvisor](Kamke152shifted2);
  [[_1st_order, _with_linear_symmetries], _rational, _Riccati]

DEtools[chinisol](Kamke152shifted2,y(x));
  /              1       /        /1                      (1/2)
 { y(x) = - ------------ |-1 + tan|- ln(x - s) (4 b a - 1)     
  \         2 a (-x + s) \        \2                           

      1                (1/2)\            (1/2)\\
    + - _C1 (4 b a - 1)     | (4 b a - 1)     | }
      2                     /                 //


Interestingly, the solution returned by the chinisol command from the DEtools package returns a more compact solution than that returned by dsolve:

dsolve(Kamke152shifted2,y(x));
                                     /        /
                                     |        |
                         1           |        |
      y(x) = - --------------------- |-s + tan|
                   / 2            2\ \        \
               2 a \x  - 2 x s + s /           

                               (1/2)                   \
        /        2            \                        |
        \(-x + s)  (4 b a - 1)/      (ln(-x + s) - _C1)|
        -----------------------------------------------|
                          2 (-x + s)                   /

                                        \
                               (1/2)    |
        /        2            \         |
        \(-x + s)  (4 b a - 1)/      + x|
                                        /


It turns out that in my model x-s is positive and y(x) is real so the output of chinisol is the most useful. Out of curiosity, I tried to get dsolve to mimick chinisol.

dsolve(Kamke152shifted2,y(x)) assuming real;
                                      /                    /
                       1              |                    |
   y(x) = --------------------------- |signum(-x + s) - tan|
          2 a signum(-x + s) (-x + s) \                    \

                (1/2) /              2                 \\
     (4 b a - 1)      \signum(-x + s)  ln(-x + s) - _C1/|
     ---------------------------------------------------|
                      2 signum(-x + s)                  /

                     \
                (1/2)|
     (4 b a - 1)     |
                     /

dsolve(Kamke152shifted2,y(x)) assuming x-s>0;
              1       /       /  1                       (1/2)
  y(x) = ------------ |1 + tan|- - ln(-x + s) (4 b a - 1)     
         2 a (-x + s) \       \  2                            

       1                (1/2)\            (1/2)\
     + - _C1 (4 b a - 1)     | (4 b a - 1)     |
       2                     /                 /

But assuming x-s<0 yields the same result. I know that Maple uses the complex logarithm by default, so I tried to combine assumptions, like: assuming x-s>0 and real; but couldn't replicate the output of chinisol. But let's move on.

According to Maple's Help files, If the invariant is independent of 'x', then the solution to the ODE follows in a straightforward manner; see Kamke, page 303. I could check that the invariant is indeed independent of x.

Chini_ode := diff(y(x),x)=f(x)*y(x)^n-g(x)*y(x)+h(x); # from Maple Help
Chini_invariant := f(x)^(-n-1)*h(x)^(-2*n+1)*(f(x)*diff(h(x),x)-diff(f(x),x)*h(x)-g(x)*f(x)*n*h(x))^n*n^(-n); # from Maple Help
Kamke2Chini:={f(x)=a,g(x)=0,h(x)=b*(x-s)^(n/(1-n))};
Kamke152_shifted := eval(Chini_ode, Kamke2Chini); # the same equation as before
Kamke152_invariant := eval(Chini_invariant,  Kamke2Chini);
subs(x-s=z,Kamke152_invariant);
simplify(%) assuming positive;
diff(%,z); # independent of z=x-s, therefore independent of x
                                         n
                       (1 - n) /    1   \
                      b        |- ------|
                               \  -1 + n/
                      --------------------
                               a          
                               0

Unfortunately I don't have Kamke's book at hand and couldn't get the internet to return relevant pieces of information about the "straightforward manner" with which Maple is apparently struggling.

Is this a case where Maple might benefit from being instructed on how to use the invariant to produce a solution? or is it a case where the solution, while straightforward, uses up too much memory?

Any suggestions will be much appreciated.

Please Wait...