# rb57cat's profile - activity

2019-10-03 06:56:33 -0500 commented answer Get results of solve

Thanks, I have now worked out how to do this and I will try the ictionary tip soon.

2019-10-02 17:35:03 -0500 commented answer Get results of solve

The number of equals is just an artefact of print/show

var("a b")

show(solve([a+b-5,a-b-1],[a, b])) print(solve([a+b-5,a-b-1],[a, b]))

[[a=3,b=2] [ [a == 3, b == 2] ]

2019-10-02 13:30:48 -0500 commented answer Get results of solve

Sorry I am unfamiliar with this forum I posted as an answer by mistake.

2019-10-02 13:29:13 -0500 answered a question Get results of solve

My session does not paste very well but at the bottom is the solution I want to parse into A, B etc. I hope you will see what I am trying to do, and you will also see the singke '='

# ratfr2ser rational fraction to power series á la Euler Archive June 2005

def ratfr2ser(ratfr, num_terms): var("A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z") lets=[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z] rnt=range(num_terms) ser = [ lets[i] * x^i for i in rnt ] ser=sum(ser) # converts from list to symbolic show(ser) ratfr_num = ratfr.numerator() ratfr_den = ratfr.denominator() eqn = (serratfr_den - ratfr_num).expand().collect(x) show(eqn) cfs = [eqn.coefficient(x, n=p) for p in rnt] show(cfs) sol = [solve(ec, ec.variables()) for ec in cfs] show(sol) for i in rnt: sol = solve(cfs[i], cfs[i].variables()) #sage_eval(str(sol[0])) #show(A) ratfr=(1-x)/(1-x-2x^2) ratfr.show() ratfr2ser(ratfr, 4)

x−12x2+x−1 x 1 2 x 2 x 1 Dx3+Cx2+Bx+A D x 3 C x 2 B x A 2Dx5+(2C+D)x4+(2B+C−D)x3+(2A+B−C)x2+(A−B−1)x−A+1 2 D x 5 2 C D x 4 2 B C D x 3 2 A B C x 2 A B 1 x A 1 [−A+1,A−B−1,2A+B−C,2B+C−D] A 1 A B 1 2 A B C 2 B C D [[A=1],[[A=r1+1,B=r1]],[[A=12r2−12r3,B=r3,C=r2]],[[B=12r4−12r5,C=r5,D=r4]]]

2019-10-02 10:45:09 -0500 asked a question Get results of solve

Hi,

Given

var("a b") solve([a+b==5,a-b==1],[a, b])

[[a == 3, b == 2]]

Is there a neat way to actually get a and b assigned to 3 and 2,

obviously this is a simplified equation.

Also sometimes one gets a == 3 and other times a = 3 why is that?

It would be good if the 'neat way' would work for both cases.

Thanks, Rob.

Is it possible to pre-load user defs from a file when using the iPad APP, NOT the browser?

2018-06-13 07:14:32 -0500 commented answer Ring conversion, finite to infinite

Thanks, That makes sense too.

2018-06-08 10:04:09 -0500 commented answer Ring conversion, finite to infinite

Thanks, I tried various ideas but I didn't think of that.

2018-06-08 04:56:24 -0500 asked a question Ring conversion, finite to infinite

Hello,

In the snippet below, how can I turn m into an integer or real so that the division results in 222?

m=mod(7, 5)
print m
2
print type(m)
<type 'sage.rings.finite_rings.integer_mod.IntegerMod_int'>
print 444/m
2


Regards, Rob.

2015-05-29 17:14:56 -0500 answered a question How use Maxima on iPad app?

By chance I have just re-read the sage info bundled with the app.

It says there the language can be selected by a long tap on the 'sage' button in the cell, or in the app settings.

This did not register with me when I first read it!

Apologies for wasting people's time,

Regards, Rob.

Thanks, the I/p was multi-line but it got compressed in the post. I should have made it clear I meant that the output had the '\n's instead of new lines. Not really a show stopper! Regards, Rob.

Apologies if this is not the correct way to respond, I am unfamiliar with this forum style.

Thanks, your suggestion did not work but it did lead me to the discussiion 'other modes for sage cell server' where I found this method: maxima.eval(r""" fpprec ss: 44; ss-33; ss+ss; """) This works except that 'newline' is replaces by '/n' Is there any parameter relating to newline?.

Thanks again, Rob.

2015-05-27 13:20:09 -0500 asked a question How use Maxima on iPad app?

Hi, I am using the Sage app on my iPad and I would like to reuse some maxima scripts.

When I try:

default_mode(maxima)
fpprec
ss: 44
ss-2


I get:

  File "<ipython-input-1-156fa75fa7d5>", line 4
ss: Integer(44)
^
SyntaxError: invalid syntax