# solving system of equations

I'm trying to solve a system of equations, but somehow Sage does not solve for it. I have solved similar systems of equations before using the same methods, but somehow it is not working this time around. What is causing Sage to not solve this?

var('r,B,a,y,k,d,c,N,A,theta')
h=solve([r==B*(a*(y/k)+1-d), y==c+k*(r-1+d), (1-a)*(y/N)==((1-theta)/theta)*(c/(1-N)), y==A*k^a*N^(1-a)],y,c,N,k)
show(h)

edit retag close merge delete

I also have a system that Sage cranks and cranks on but never returns an answer: var('r,s,m,n,l,A,B,C,D,E,F') solve([2*m - 2*r==2*A*m*l + B*n*l + D*l, 2*n-2*s==B*m*l + 2*C*l*n + E*l, A*m + B*m*n + C*n^2 + D*m + E*n + F == 0], m, n, l) Any thoughts as to why this happens?

Sort by » oldest newest most voted

Let us rewrite the code, so that every human eye can digest the question:

var( 'r,B,a,y,k,d,c,N,A,theta' )
eq1 = r == B * ( a*y / k + 1 - d )
eq2 = y == c + k * (r-1+d)
eq3 = (1-a)*(y/N) == (1-theta) / theta * c / (1-N)
eq4 = y == A * k^a * N^(1-a)
h   = solve( [ eq1, eq2, eq3, eq4 ], [y,c,N,k] )


Now we will look closer to the eq4 and see that variable k to the power... variable a. The doc of solve refers to algebraic equations.

Docstring: Algebraically solve an equation or system of equations (over the complex numbers) for given variables. Inequalities and systems of inequalities are also supported.

more