This has been discussed before.  We want both the behaviors of solve
and dsolve.  i.e., we want both

>>> solve(f(x).diff(x) - f(x), f(x))
[Derivative(f(x), x)]

and

>>> dsolve(f(x).diff(x) - f(x), f(x))
f(x) == C1*exp(x)

I don't like the idea of using f instead of f(x) as a flag. What
happens if there is also f(y) (and even f(y).diff(y)) in the equation?

Besides, this goes against what we are trying to do with
https://code.google.com/p/sympy/issues/detail?id=3560, which is to
simplify solve().  Merging dsolve() and solve() would also require
merging all their options, and making sure that they are consistent
and don't conflict.  Keeping the different types of solvers separate
is a good thing, in my opinion.

Aaron Meurer


On Mon, May 27, 2013 at 12:22 PM, F. B. <franz.bona...@gmail.com> wrote:
> Hi, what about putting a dispatcher into solve to redirect to dsolve in case
> it detects the system contains a differential equation?
>
> I mean something like this:
>>
>> >>> f = Function('f')
>>
>> >>> solve(f(x).diff(x) - f(x), f(x)) # solve as a non-differential
>> >>> equation
>>
>> [f(x)]
>>
>> >>> solve(f(x).diff(x) - f(x), f) # when only "f" without round braces,
>> >>> dispatch it as differential equation.
>>
>> [A * exp(x)]
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy?hl=en-US.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to