Ask Your Question

MaikB's profile - activity

2015-01-29 02:40:25 +0200 received badge  Notable Question (source)
2013-09-10 09:39:07 +0200 received badge  Popular Question (source)
2011-08-06 06:49:09 +0200 received badge  Supporter (source)
2011-08-05 04:07:40 +0200 commented answer Interactive maxima question on fraction value during solve()

I found the variable in maxima: logexpand. Sage offers .expand_log(), which ".. uses the Maxima simplifier and sets logexpand option for this simplifier." log(eq).log_expand().full_simplify() now results in the desired -(k - 2)*log(x)/k == -(k*log(2/(k + 1)) - log(x))/k

2011-08-05 03:49:02 +0200 commented answer Interactive maxima question on fraction value during solve()

For me .simplify_full() doesnt factor out the variables in exponents: eq.simplify_full() results in 2*log(x^(1/k)) - log(x) == log(1/2*(k + 1)*x^(1/k)). A simpler example log(x^(2*k)).full_simplify() 2*log(x^k) . I guess some option variable in maxima has to be altered.

2011-08-04 17:28:31 +0200 received badge  Student (source)
2011-08-04 09:16:47 +0200 asked a question Interactive maxima question on fraction value during solve()

Context

I executed this code

var('x, k')
As(x) = (2*k/(k-1))^(-0.5) * (( x^(2/k)  - x^((k+1)/k)) )^(-0.5)
dAs(x) = As.derivative(x)
ns = solve(dAs(x), x)
print ns

which results in

[
(1/(x^((k - 2)/k))) == 1/2*(k + 1)*x^(1/k)
]

My goal is the have sage solve this equation for x, where the result should look something like

x == ( 2/(k+1) )^( k/(k-1) )

The Problem

This code

myEqs = [ (1/(x^((k - 2)/k))) == 1/2*(k + 1)*x^(1/k) ]
assume(k>1)
solve(myEqs, x)

results in

       
Traceback (click to the left of this block for traceback)
...
TypeError: Computation failed since Maxima requested additional constraints (try the command 'assume(k-1)/k>0)' before integral or limit evaluation, for example):
Is (k-1)/k an integer?

But the suggested assume(k-1)/k>0) isn't even valid syntax.

My question: How can I cover this question with assume() so that maxima doesn't have to ask (and hence fail because it doesn't support interactive communication with another process)?