ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 09 May 2017 09:48:50 -0500Interactive solving differential equations with MAXIMA's desolvehttp://ask.sagemath.org/question/37553/interactive-solving-differential-equations-with-maximas-desolve/I am using Maxima's "desolve" to handle a system of linear differential equations.
During processing, Maxima arrives at an intermediate expression (in my case this is a complicated argument of a sqareroot)
that may be positive, negative or zero. Maxima asks me interactively if this expression is negative, positive or zero.
If I use "desolve" directly within the Maxima's notebook, I can give my answer interactively
(e.g., "pos") to Maxima. Consequently, Maxima can continue processing immediately.
Thus, in Maxima's notebook there is no need to use an 'assume' statement that includes
the whole complicate expression in question.
On the contrary, processing this system via Maxima's 'desolve ' at a sage's notebook is very inconvenient,
since, according to sage's documentation, one can answer such questions only via assumes given prior to 'desolve'.
Moreover, in the treated case Maxima ignores such 'assume'-statements.
Thus, solving my equation system at Maxima via sage turns out to be impossible.
Thus my question: Is it really impossible to answer Maxima's interactive questions via sage?
If not, one should implement this feature in future save-versions.
This would enable sage to solve linear differential equations that cannot be treated by sage up to now.
Here is a simlpe executable example for interactive working with Maxima.
(Members of Maxima's discussion forum gave this example to me for demonstration)
I tried to answer this question interactively at a sage- notebook.
Unfortunately, This leads to a deadlock in the sage-platform (version 7.4).
(%i1) integrate(x^a,x);
Is a equal to -1?
no;
(%o1) x^(a+1)/(a+1)
bekalphTue, 09 May 2017 09:48:50 -0500http://ask.sagemath.org/question/37553/declare a variable as *not* an integer for solvehttp://ask.sagemath.org/question/34876/declare-a-variable-as-not-an-integer-for-solve/ I am trying to solve symbolically a simple equation for x:
solve(x^K + d == R, x)
I am declaring these variables and assumptions:
var('K, d, R')
assume(K>0)
assume(K, 'real')
assume(R>0)
assume(R<1)
assumptions()
︡> [K > 0, K is real, R > 0, R < 1]
Yet when I run the solve, I obtain the following error:
> Error in lines 1-1
>
> Traceback (most recent call last):
>
> File
> "/projects/sage/sage-7.3/local/lib/python2.7/site-packages/smc_sagews/sage_server.py",
> line 957, in execute
> exec compile(block+'\n', '', 'single') in namespace, locals
>
> ...
>
> File "/projects/sage/sage-7.3/local/lib/python2.7/site-packages/sage/interfaces/interface.py",
> line 671, in __init__
> raise TypeError(x)
>
> TypeError: Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(K>0)', see `assume?` for more details)
>
> **Is K an integer?**
Apparently, maxima is asking whether K is an integer? But I explicitly declared it 'real'!
How can I spell out to maxima that it should not assume that K is an integer?
ThanksAntoine-sacWed, 21 Sep 2016 04:11:14 -0500http://ask.sagemath.org/question/34876/