MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: DSolve and assuming: wrong solution found by Mathematica 6. A bug

I'm not sure about this, but I don't think DSolve uses assumptions.

The manual has the following about DSolve and symbolic parameters

In summary, the ability to solve differential equations with symbolic
parameters is a powerful and essential feature of any symbolic solver
such as DSolve. However, the following points should be noted.
- The solution might be complicated, and such calculations often
require significant time and memory.
- The answer might not be valid for certain exceptional values of the
- The solution might be easy to verify symbolically for some special
values of the parameters, but in the general case a numerical
verification method is preferable.

Cheers -- Sjoerd
On Nov 7, 1:00 pm, Pianiel <pdp... at> wrote:
> Hi all,
> I tried unsuccessfully to find the solution of a differential equation
> using Mathematica The given solution is wrong. Would it be
> possible to help me?  Here is what I have done:
> Knowing that n is an integer, I want to solve the following
> differential equation:
> DSolve[r^2A''[r]+r A'[r]+(K^2r^2-n^2)A[r]==r( n B1- B2),A[r],r]
> So what I wrote is:
> Res=Assuming[Element[n,Integers],DSolve[r^2A''[r]+r A'[r]+(K^2r^2-
> n^2)A[r]==r( n B1- B2),A[r],r]]
> I checked using:
> Res /. n -> 1
> And the result is Indeterminate! Sad!! (same thing with n->2 or n-
> >3, ...)
> On the contrary when I change directly the value of n in the equation
> and set it n=1:
> DSolve[r^2 A''[r] + r A'[r] + (K^2 r^2 - 1^2) A[r] == r ( 1 B1 - B2),
> A[r], r]
> Mathematica find a solution!
> Where is the bug? How to find the general solution with n integer
> for:
> DSolve[r^2A''[r]+r A'[r]+(K^2r^2-n^2)A[r]==r( n B1- B2),A[r],r]
> Is Mathematica able to do that??
> Thanks somuch for your help!
> Pianiel

  • Prev by Date: RE: Basic programming
  • Next by Date: List of Month Names
  • Previous by thread: Re: Gluing file together
  • Next by thread: List of Month Names