HP Forums
Solving simultaneous equations involving complex numbers - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Solving simultaneous equations involving complex numbers (/thread-2649.html)



Solving simultaneous equations involving complex numbers - mbeddo - 12-17-2014 09:16 PM

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?


RE: Solving simultaneous equations involving complex numbers - Helge Gabert - 12-17-2014 09:48 PM

No problem solving systems of linear (and non-linear) equations in the complex domain with fsolve().


RE: Solving simultaneous equations involving complex numbers - Divasson - 12-20-2014 07:56 PM

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


RE: Solving simultaneous equations involving complex numbers - Tim Wessman - 12-30-2014 12:14 AM

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.


RE: Solving simultaneous equations involving complex numbers - Helge Gabert - 12-30-2014 01:18 AM

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.


RE: Solving simultaneous equations involving complex numbers - akmon - 12-30-2014 08:57 AM

Totally agree.


RE: Solving simultaneous equations involving complex numbers - lilwhiteperson - 01-15-2015 02:26 AM

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 (:


RE: Solving simultaneous equations involving complex numbers - Helge Gabert - 01-15-2015 03:52 AM

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.