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.Thu, 04 Dec 2014 01:07:57 +0100Solving systems of equations always returns [ ]https://ask.sagemath.org/question/25105/solving-systems-of-equations-always-returns/Suppose I have the set of equations and I'm trying to solve for f1, f2 and f3:
![formula][1]
[1]: http://latex.codecogs.com/gif.latex?f_1%20%26%3D%26%20a+b+f_2%20%5C%5C%202f_2%20%26%3D%26%20c+d+f_1%20%5C%5C%20f_3%20%26%3D%26%20f_1+f_2
I've tried solving it in the following way
eq1 = f1 == a + b + f2
eq2 = 2*f2 == c + d + f1
eq3 = f3 == f1 + f2
solve([eq1,eq2,eq3],f1,f2,f3)
[]
This is easy to solve using matrices, and I have double-checked that the answer is fully constrained, so why does sage always return [ ]? I would have expected answers for f1, f2 and f3 in terms of a, b , c and d. Is there another argument to solve() that tells Sage what I want my answer in terms of?
I would prefer to use solve() instead of matrices both for the sake of convenience and if I have a nonlinear system later on.
EvidloThu, 04 Dec 2014 01:07:57 +0100https://ask.sagemath.org/question/25105/A very nonlinear system of three equationshttps://ask.sagemath.org/question/10506/a-very-nonlinear-system-of-three-equations/Here's a fun little problem: determine the exponential curve f(x) = c + ba^x defined by three points, (2,10), (4,6), and (5,5).
The system of three equations and three unknowns is
10 = c + ba^2
6 = c + ba^4
5 = c + ba^5
It's not that hard to solve numerically. With a little algebraic substitution and iteration, the answer turns out to be
a = 0.640388203
b = 16.53456516
c = 3.219223594
But is there a more elegant way to use Sage to arrive at this result? I'm stumped.OrionNavThu, 05 Sep 2013 04:15:08 +0200https://ask.sagemath.org/question/10506/Finding solution to nonlinear equations numerically in a rangehttps://ask.sagemath.org/question/9430/finding-solution-to-nonlinear-equations-numerically-in-a-range/Hi,
this question is probably quite easy to solve. I've got two nonlinear equations with a solution in the range of (0,1). As described in the sage tutorial I tried the following:
var('p t')
eq2 = p==1 - (1 - (1 - (1 - 0.01)^1036)^20)*(1 - t)^(9)
eq1 = t==(2*(1 - 2*p))/((1 - 2*p)*16 + 15*p(1 - (2*p)^1023))
solns = solve([eq1,eq2],t, solution_dict=True)
[[s[t].n(10)] for s in solns]
Unfortunately this doesn't work. In addition I tried find_root, but failed miserably. Any ideas? rnwW6Qz3Mon, 15 Oct 2012 19:15:30 +0200https://ask.sagemath.org/question/9430/