Systems of complex-number equations, how to solve?

  • #1
848
4

Main Question or Discussion Point

Hi. I would like to state first of all that I do know how to solve systems of equations in the complex domain by hand. But solving by hand is no longer required in my course, and getting the answers most quickly is becoming the highest priority.

But the real problem is that I am getting into steady-state analysis and often have systems of equations from nodal or mesh analysis whereby the coefficients of a voltage or current are complex numbers. I would like to know two things:

1. Is there a simple way to solve such systems on a TI-89 calculator, presumably using matrices? Solving such systems is a cinch in the real domain using the "rref" function.

2. Is there a simple way to solve such systems in MatLab, presumably using matrices?

If anyone could help, that would be great!
 

Answers and Replies

  • #2
f95toli
Science Advisor
Gold Member
2,938
439
It is straightforward in Matlab, you simply use the same methods as real systems of equations, i.e. A\b will usually do the job for a linear system where A is the matrix of coffiecients and b the RHS.
 
  • #3
848
4
It is straightforward in Matlab, you simply use the same methods as real systems of equations, i.e. A\b will usually do the job for a linear system where A is the matrix of coffiecients and b the RHS.
Hmmm...Could you give an example? I am extremely new to Matlab, and don't really know it very well.

So, if I wanted to solve this matrix:

(15+35i) (29+1i) 0
(46+13i) (62+3i) 0

How exactly would I enter all this into matlab? An example would be so appreciated, sometimes that's the best way to learn.
 
  • #4
f95toli
Science Advisor
Gold Member
2,938
439
Well, the equation is Ax=b and we want so solve for x
There are several ways of entering the data, but this is one way
Code:
A=[15+35i 29+1i; 46+13i  62+3i]
b=[0;0]
x=A\b
which of course has the trivial solution x=[0;0]
the ";" means "next row", a space next column.
 
  • #5
108
0
Can't this be solved by Cramer's rule?
 
  • #6
Does anybody know of a java applet or a c++ program that could solve a system of complex number equations? I dont have matlab or a ti-89. I need it for doing nodal and mesh analysis in ac ckts. I know how to solve it on paper but the problem that I need to solve has 5 equations and 5 unknowns.
 
  • #7
The Electrician
Gold Member
1,246
152
This person used Wolfram Alpha:

https://www.physicsforums.com/showthread.php?t=381884

Here are what appear to be a lot of linear algebra calculators. There may be something of use in all this:

http://www.martindalecenter.com/Calculators2_6_AD.html#COMP-ALGEBRA-LINEAR-CALCULATORS

http://www.martindalecenter.com/Calculators2_6_AD.html#COMP-ALGEBRA-LINEAR-MATRIX

Even an older calculator such as the TI-85 or TI-86 can solve a system with complex coefficients, and they can be found inexpensively on eBay.
 
  • #8
245
13
There are a couple of free and open source alternatives to Matlab if you want a full fledged math solving interface. http://www.scilab.org/" [Broken] is made by MIT. Scilab aims to be just like Matlab and Maxima is somewhat like Maple. You can find lot's of tutorials for either with a Google search.
 
Last edited by a moderator:
  • #9
Thanks guys.
 
  • #10
I have been trying to figure this out since we started doing AC circuit analysis. To to it on the TI-89 use F2 --> Complex --> cSolve(). Use cSolve() as you would normally use the solve().
Hope this helps.
 
  • #11
I have been trying to figure this out since we started doing AC circuit analysis. To to it on the TI-89 use F2 --> Complex --> cSolve(). Use cSolve() as you would normally use the solve().
Hope this helps.
Wow, thanks. I've been trying to plug complex numbers into a matrix for an hour, lol. I know it's possible via rref() but cSolve() is nice and clean.
 
  • #12
848
4
LOL @ reviving a thread of mine from three years ago. It's like a journey through time...
 
Top