Forums before death by AOL, social media and spammers... "We can't have nice things"
|    sci.math.symbolic    |    Symbolic algebra discussion    |    10,432 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 9,124 of 10,432    |
|    Nasser M. Abbasi to All    |
|    strange form for solution of ODE when in    |
|    27 Jul 16 21:00:53    |
   
   From: nma@12000.org   
      
   For first order ODE, linear. If the integrating factor   
   can't be integrated, as in the example below, Mathematica   
   gives the general solution in different form (but correct)   
   than what one would do by hand and compared to Maple.   
      
   I was wondering if someone can shed a light on the logic   
   behind this form of answer. Here is an example   
      
   eq = y'[x] + Cos[x] y[x] == 1;   
      
   The integrating factor is exp(int(cos(x))=exp(sin(x))   
   so the above becomes   
      
    d( y(x)*exp(sin(x)) = exp(sin(x))   
      
   Integrating both sides gives the solution   
      
    y(x) = exp(-sin(x)) * int( exp(sin(x), dx) + C_1 exp(-sin(x))   
      
   Where C_1 is integration constant.   
      
   And we stop here. There is no closed form solution to   
   int(exp(sin(x), dx). The above is what Maple returns also.   
      
   Mathematica, however, writes the final solution like this   
      
   y(x) =exp(-sin(x)) * int( exp(sin(k), k=1..x) + C_1 exp(-sin(x))   
      
   i.e. instead of the "normal"   
      
    int( exp(sin(x)), dx)   
      
   It writes it as definite integral in new variable 'k'   
      
    int( exp(sin(k)), k=1..x)   
      
   I never understood why that is. It is correct, but why not   
   leave it as int( exp(sin(x)), dx)? Is there a mathematical reason   
   for it? More general in some sense?   
      
   ------------------------   
   ClearAll[x, y]   
   eq = y'[x] + Cos[x] y[x] == 1;   
   DSolve[eq, y[x], x]   
   -----------------------------   
   y[x]->C[1]/E^Sin[x] + Integrate[E^Sin[K[1]],{K[1], 1, x}]/E^Sin[x]   
      
   Maple:   
      
   dsolve(diff(y(x),x)+cos(x)*y(x)=1,y(x));   
    y(x) = exp(-sin(x))*(Int(exp(sin(x)), x))+exp(-sin(x))*_C1   
      
   Which form does your CAS generate for this?   
      
   Using M 10.4.1 and Maple 16.1 on windows.   
      
   --Nasser   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca