Ask Your Question

pircks's profile - activity

2018-04-16 08:02:15 -0600 received badge  Nice Question (source)
2018-04-11 12:19:51 -0600 asked a question Non-linear regression with arbitrary precision arithmetic

I'm looking to do something like this:

R = RealField(1000)
data = [[R(1),R(5)],[R(5),sqrt(R(6))],[R(8),R(9)]]
var('a, b, c, x')
model(x) = a*x*x + b*x + c
find_fit(data, model)

However when I run this a,b and c seem to have been truncated to a double. How would I get arbitrary precision out of find_fit?

2015-12-31 11:01:07 -0600 received badge  Supporter (source)
2015-12-30 18:58:16 -0600 asked a question Expanding cos(a*(x+y))

I'm having trouble finding out how to expand

a*(x+y)

when wrapped by cos(). The expression

expand(a*(x+y))

expands as expected, but

expand(cos(a*(x+y)))

, leaves the expression unchanged. I would prefer a solution that scales for more complex expressions

2015-12-28 03:02:50 -0600 received badge  Student (source)
2015-12-28 01:59:08 -0600 asked a question Converting expression to list of terms and back

Given an expression how would I convert it to a list, and how would I convert a list to an expression?

For example:

x * b * cos(x^3) * sin(b)+b * cos(x)+h * sin(x)

Would convert to:

[x * b * cos(x^3) * sin(b),b * cos(x),h * sin(x)]

2015-12-28 01:59:08 -0600 commented question Trouble building sage from source inside a docker container

You mentioned that the above doesn't work. Is there a specific error?