Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with supposedly normal DE problem #14092

Open
kcrisman opened this issue Feb 10, 2013 · 3 comments
Open

Error with supposedly normal DE problem #14092

kcrisman opened this issue Feb 10, 2013 · 3 comments

Comments

@kcrisman
Copy link
Member

See this ask.sagemath.org question.

var('a b n k t')
c = function('c',t)
de = diff(c,t) - a + (b*c)*((c**n)/((k**n)+(c**n))) == 0
des = desolve(de,[c,t],[0,0])

yields an error about c(t) not being a proper Python identifier. Various other combinations yield similar ECL errors, and at least sometimes one can get segmentation faults after inserting print statements.

CC: @sagetrac-schymans

Component: calculus

Issue created by migration from https://trac.sagemath.org/ticket/14092

@kcrisman
Copy link
Member Author

comment:1

Simpler example that seems to behave analogously.

de = diff(c,t) - a + c^n == 0

Note that making n a specific integer gives questions about the sign of a and assume(a>0) fixes things.

Are there maybe just too many variables?

@sagetrac-schymans
Copy link
Mannequin

sagetrac-schymans mannequin commented May 17, 2013

comment:2

I don't think it is about the number of variables, but about maxima not being able to provide an explicit solution. Here is the example computed directly in maxima:

maxima("de: 'diff(c(t),t) - a + c(t)^n")
maxima("atvalue (c(t), t = 0, 0);")
maxima("ode2(de,c(t),t);")

gives:

-'integrate(1/(c(t)^  n-a),c(t))=t+%c

Note that the integral containing c(t)n could not be solved.
Replacing n by an integer and defining c as positive:


maxima("de: 'diff(c(t),t) - a + c(t)^2")
maxima("atvalue (c(t), t = 0, 0);")
maxima("assume(a>0);")
maxima("ode2(de,c(t),t);")

gives:

-log(-(sqrt(a)-c(t))/(c(t)+sqrt(a)))/(2*sqrt(a))=t+%c

Is it possible that the 'integrate in the solution creates a problem?

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@rwst
Copy link

rwst commented Nov 2, 2017

comment:8

With #22024 we get:

sage: solve(de,t,algorithm='sympy')
ConditionSet(t, Eq(-a*(k**n + c(t)**n) + b*c(t)*c(t)**n + (k**n + c(t)**n)*Derivative(c(t), t), 0), Complexes(S.Reals x S.Reals, False)) \ ConditionSet(t, Eq(k**n + c(t)**n, 0), Complexes(S.Reals x S.Reals, False))

@mkoeppe mkoeppe removed this from the sage-6.4 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants