ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 14 Nov 2016 20:01:46 +0100ValueError: Computation failed since Maxima requested additional constraintshttps://ask.sagemath.org/question/35572/valueerror-computation-failed-since-maxima-requested-additional-constraints/ I am trying integrate an exponential decay function.
reset()
var('t,v')
tmax=0.01
fx=((1.66533453693773e-16 +
1.99493199737333e-17*i)*e^((2.57571741713036e-13 -
1.81898940354586e-12*i)*t) + (1.00000000000000 -
1.99493199737333e-17*i)*e^(-(30.0000000000003 - 12784.0000000000*i)*t))
forget()
assume(v>0)
integrate(fx*exp(-i*v*t),(t,0,tmax))
the error shows
Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(-%i*v/(0.257571741713036e-12-0.181898940354586e-11*%i)
>0)', see `assume?` for more details)
Is -%i*v/(0.257571741713036e-12-0.181898940354586e-11*%i)
+12784.0*%i/(0.257571741713036e-12-0.181898940354586e-11*%i)
-30.00000000000026/(0.257571741713036e-12-0.181898940354586e-11*%i)-1
equal to -1?
no assumption working. please help.mkrMon, 14 Nov 2016 20:01:46 +0100https://ask.sagemath.org/question/35572/Using solve() to find positive real solutions to a complex equationhttps://ask.sagemath.org/question/8973/using-solve-to-find-positive-real-solutions-to-a-complex-equation/I need `solve()` to return only positive real solutions to a symbolic complex equation, but it fails to find a useful solution:
sage: var('x, y', domain='positive')
sage: z = 1/(i*x + 1/(i*y + 1))
sage: Equation = z == 2
sage: solve(Equation, x, y)
([x == (-I*y + 1)/(2*y - 2*I)], [1])
I want solutions in the form `[x == foo, y == bar]`. Splitting Equation into real and imaginary components does the trick:
sage: Equation = [z.real() == 2, z.imag() == 0]
sage: solve(Equation, x, y)
[[x == (-1/2), y == -1], [x == (1/2), y == 1]]
But why is that reformulation necessary to produce useful results? Isn't it equivalent to the original Equation?
Also, why does `solve()` ignore my variables' `domain='positive'` clause? Solve also ignores positive x and y assumptions:
sage: assume(x>0)
sage: assume(y>0)
sage: solve(Equation, x, y)
[[x == (-1/2), y == -1], [x == (1/2), y == 1]]
And it bugs out when positive x & y clauses are added to Equation:
sage: Equation.append(x>0, y>0)
sage: solve([Equation, x>0], x, y)
[[0 < x, [1/((y^2 + 1)*(1/(y^2 + 1)^2 + (x - y/(y^2 + 1))^2)) == 2, -(x - y/(y^2 + 1))/(1/(y^2 + 1)^2 + (x - y/(y^2 + 1))^2) == 0, x > 0, y > 0]]]TSchwennWed, 16 May 2012 02:25:20 +0200https://ask.sagemath.org/question/8973/Additional conditions for expressionhttps://ask.sagemath.org/question/8009/additional-conditions-for-expression/Hi (sorry for bad eng.), i have next code
reset()
var('K1, T1, T2')
var('p')
# Transient function W(p)
W = K1 * p / ((T1 * p - 1) * (T2 * p - 1))
# Amplitude-phase-frequency characteristic W(jw)
Wa(omega) = W(p = I * omega)
Re(omega) = Wa(omega).real()
Im(omega) = Wa(omega).imag()
print(Re)
but last string gives loooooong result, because sagemath don't knows that K1, T1, T2 and omega are real, how to "tell" that to sagemath ?avi9526Sat, 19 Mar 2011 14:16:30 +0100https://ask.sagemath.org/question/8009/