Ask Your Question
0

Solving linear systems

asked 2013-02-24 13:35:01 -0500

dpzmick gravatar image

Hello, I am not sure if I am going about this correctly, but I am having some trouble using sage ('Sage Version 5.3, Release Date: 2012-09-08') to solve pretty simple linear systems. For example:


sage: var('i1 i3 i4')
sage: r1 = ... (r1 - r6 are constants)
sage: v1 = ... (v1, v2 constants)
sage: eq1 = i1*(r1+r2+r6) + i3*(r2 + r6) + i4*(r4+r5) == 0
sage: eq2 = i3*(r2+r2+r6) + i1*(r6+r2) + v1 - v2 ==0
sage: eq3 = i1*(r1+r2+r6) + i3*(r6+r2) - v2 == 0
sage: solve([eq1,eq2,eq3], i3)
[]
 

I have had to manually go through and perform substitution to solve this. I am also aware of techniques from linear algebra to solve these systems, however I do not know how to use any of them. Even so, it seems like the solve command should be able to perform this, so I assume I am just using it incorrectly.

Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-02-24 13:41:04 -0500

calc314 gravatar image

You need to give the solve command all of the variables for which it is to solve.

solve([eq1,eq2,eq3], [i1,i3,i4])
edit flag offensive delete link more

Comments

Okay. Thank you!

dpzmick gravatar imagedpzmick ( 2013-02-24 13:48:00 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-02-24 13:35:01 -0500

Seen: 118 times

Last updated: Feb 24 '13