Group Abstract Group Abstract

Message Boards Message Boards

DSolve gives result Complex infinity, but gives different result with simplified input

Posted 2 years ago
POSTED BY: Leslaw Bieniasz
2 Replies

Hi Leslaw,

Beware: D is the partial derivative function, and should not be used as a variable/parameter/user-function name. (Best to avoid single capitals and starting user-symbol names with capitals, when possible.)

That said, I do not get ComplexInfinity for either code in your post (neither on V13.3.1, MacOS nor on wolframcloud.com).

I get a simpler result for the first one, using Gianluca's assumption, from

resA = DSolve[
  u''[x] - (s/D)*u[x] == -(k/D)*(u0/s)*(1 - Exp[-Sqrt[s/D]*x]) /. 
   D -> B, (* changed D to B *)
 u[x], x, Assumptions -> B > 0]

It might not be any help. If you're using an older version, prehaps try upgrading or wolframcloud.com.

POSTED BY: Michael Rogers

In version 13.3 I get the error with

resA = DSolve[
  u''[x] - (s/D)*u[x] == -(k/D)*(u0/s)*(1 - Exp[-Sqrt[s/D]*x]), u[x], 
  x]
resB = FullSimplify[resA, D > 0]

I suppose it has something to do with a wrong choice of sign for Sqrt during the calculation,

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard