HP Forums

Full Version: Solving simultaneous equations involving complex numbers
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was meeting with my department chair today, and he asked if there was a way to solve linear equations involving complex numbers using TI-84 calculators (these are ubiquitous at our college). There isn't - not without writing a program to do it.

After I got back home, I went through the user guide for the HP Prime. I'd like to advocate for the HP Prime among our students, but it seems neither the Solve or Linear Solver apps can handle complex numbers. So it seems a program is required there as well.

One has to solve such equations all the time in Circuit Analysis courses, where the impedance can be complex.

Am I missing something?
No problem solving systems of linear (and non-linear) equations in the complex domain with fsolve().
You just need to enter complex coefficients in matrix M1 (variable coefficients) and M2 (constant term), and just divide M2 by M1 - or invert it and multiply
I've put this in the bucket of requests. I do think some way to handle that in those applications would be a nice enhancement. Not quite sure how to do that without making things overly complex for general users yet though. I'd like whatever solution to also work nicely in places like function for example to enable graphing of complex/real in there for example too.

As stated though, you can already solve using solve, csolve, fsolve, etc.
If you put that in the bucket of requests, please take the time to look at the SOLVESYS library for the Hp48/49/50 series on hpcalc.org. SOLVESYS is very fast, has a well-organized menu and works with simultaneous linear and non-linear systems of equations. Complex coefficents are allowed, and complex solutions are, too (check on/off). The user can also indicate which variables to solve for, and which should remain symbolic. The diagnostics are extensive, and useful. The SOLVESYS interface would be a wonderful replacement for the SOLVE app.

I use SOLVESYS when I need to do *real* work, and it hasn't failed me yet.
Totally agree.
Hi,

I'm currently enrolled in a Circuit Analysis course and I've gotten to the point where the impedance is complex. Is there any alternative to solve simultaneous equations with complex numbers? One of you said that "fsolve" would work, but I don't know how to use it with them.

If someone could explain to me how to use it to solve these equations or how to use a matrix or any other of the alternatives you gave or the same objective I'd be extremely grateful.

Thank you in advance (:
In two dimensions:

fsolve([eq1, eq2],[var1, var2],[startvalue_for_var1, startvalue_for_var2])

eq1 could be x^y-y^2=9, var1 would be x, var2 would then be y, startvalue_for_var1 could be 0.1.

eq2 could be . . . you choose.

Just add more equations, variables, starting values for higher dimensions.

Starting values are important, because generally, your solution will not be unique.
Reference URL's