Status: Accepted
Owner: jorn.baayen
CC: asmeurer
Labels: Type-Defect Priority-Medium WrongResult

New issue 1739 by jorn.baayen: Constants 'C_i' in differential equations  
confuse solver
http://code.google.com/p/sympy/issues/detail?id=1739

The last call to dsolve() in the following snippet does not return the  
correct solution of the
differential equation: the part 3 * C_1 is not integrated correctly.


In [1]: eq = Eq(f(x).diff(x), 2 * x)

In [2]: eq
Out[2]:
d
──(f(x)) = 2⋅x
dx

In [3]: sol = dsolve(eq, f(x))

In [4]: sol
Out[4]:
              2
f(x) = C₁ + x

In [5]: g = 3 * sol.rhs

In [6]: g
Out[6]:
           2
3⋅C₁ + 3⋅x

In [7]: eq = Eq(f(x).diff(x), g)

In [8]: eq
Out[8]:
d                    2
──(f(x)) = 3⋅C₁ + 3⋅x
dx

In [9]: dsolve(eq, f(x))
Out[9]:
                     3
f(x) = C₁ + C₂⋅x + x

In [10]:

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--

You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.


Reply via email to