Ask Your Question

rb57cat's profile - activity

2022-02-16 14:30:31 +0200 received badge  Notable Question (source)
2020-08-14 19:01:59 +0200 received badge  Popular Question (source)
2019-10-03 13:56:33 +0200 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-03 00:35:03 +0200 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 20:30:48 +0200 commented answer Get results of solve

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

2019-10-02 20:29:13 +0200 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 single '='.

# 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 = (ser*ratfr_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-2*x^2)
ratfr.show()
ratfr2ser(ratfr, 4)
2019-10-02 17:45:09 +0200 asked a question Get results of solve

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.

2019-06-07 14:48:00 +0200 asked a question iPad app pre-load user definitions?

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

2018-06-13 14:14:32 +0200 commented answer Ring conversion, finite to infinite

Thanks, That makes sense too.

2018-06-09 03:26:08 +0200 received badge  Nice Question (source)
2018-06-08 18:48:16 +0200 received badge  Student (source)
2018-06-08 17:04:09 +0200 commented answer Ring conversion, finite to infinite

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

2018-06-08 17:03:54 +0200 received badge  Supporter (source)
2018-06-08 16:59:10 +0200 received badge  Scholar (source)
2018-06-08 16:48:25 +0200 received badge  Famous Question (source)
2018-06-08 11:56:24 +0200 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.

2016-11-15 03:48:54 +0200 received badge  Notable Question (source)
2016-11-15 03:48:54 +0200 received badge  Popular Question (source)
2015-05-30 19:44:18 +0200 received badge  Self-Learner (source)
2015-05-30 19:44:18 +0200 received badge  Teacher (source)
2015-05-30 00:14:56 +0200 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.

2015-05-28 20:28:44 +0200 commented answer How use Maxima on iPad app?

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.

2015-05-28 12:45:37 +0200 commented answer How use Maxima on iPad app?

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 20:20:09 +0200 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

Can anyone help please?

Regards, Rob.