Solve a System of complex equatoins
|
10-03-2017, 07:16 AM
Post: #1
|
|||
|
|||
Solve a System of complex equatoins
Hey everyone, new here obviously. Just purchased an HP Prime, coming from a TI89. Still trying to get used to the new syntax and commands.
How do I solve a system of complex equations? such as; -12+(-i4+i5)*A-i3*B (12+i6)*B-i3*A In the ti8 it was csolve( {-12+(-i4+i5)*A-i3*B,(12+i6)*B-i3*A},{A,B} ) But this is not the case with the HP Prime. Thoughts? Thank you! |
|||
10-03-2017, 06:59 PM
(This post was last modified: 10-03-2017 07:02 PM by toshk.)
Post: #2
|
|||
|
|||
RE: Solve a System of complex equatoins
In CAS: try
fsolve({-12+(-4*+5*)*A-3**B,(12+6*)*B-3**A},{'A','B'}) [/code] |
|||
10-03-2017, 07:53 PM
Post: #3
|
|||
|
|||
RE: Solve a System of complex equatoins
What is the significance of i4, i5, etc? Is it something specific or just "a variable"?
TW Although I work for HP, the views and opinions I post here are my own. |
|||
10-03-2017, 07:55 PM
Post: #4
|
|||
|
|||
RE: Solve a System of complex equatoins
csolve should work. Beware that fsolve is approx.
|
|||
10-04-2017, 08:24 PM
Post: #5
|
|||
|
|||
RE: Solve a System of complex equatoins
Hello
(10-03-2017 07:16 AM)kitsunekatari Wrote: How do I solve a system of complex equations? Please first note those are not equations, also important : on cas, you must use lowercase variable, I added "=0" to have equations, and tried it : csolve({-12+(4i+5i)*a-3i*b=0, (12+6i)*b-3i*a=0}, {a,b}) I got { (-16-8i)/(5-12i) , -4i/(5-12*i) } primer |
|||
10-04-2017, 10:23 PM
Post: #6
|
|||
|
|||
RE: Solve a System of complex equatoins
Not necessary. I used capital letter "A" & "B" with csolve in CAS mode on the HP Prime and got the same answer as Primer.
|
|||
10-05-2017, 02:19 AM
Post: #7
|
|||
|
|||
RE: Solve a System of complex equatoins
Perhaps not necessary but perhaps it should. Expressions aren't equations, evaluating is not solving, etc.
I wouldn't mind if functions like the various *solve functions would generate an exception when being given an expression rather than an equation... It might actually prevent a lot of user errors at the "expense" of a trivial amount of overhead. |
|||
10-05-2017, 02:57 AM
Post: #8
|
|||
|
|||
RE: Solve a System of complex equatoins
(10-03-2017 07:53 PM)Tim Wessman Wrote: What is the significance of i4, i5, etc? Is it something specific or just "a variable"? They are imaginary. Standard syntax in EE is to use j followed by the quantity of said unit, in this case, Ohms. Thank you everyone for your input. I am just trying to get used to the different syntax. In the 89, variables were variables, you put in x, it returns x, unless a value is stored in said variable. In the Prime, you put in A, or X, it returns 0 because nothing is stored in it. So sometimes it's hard to check to see if an equation simplifies correctly. |
|||
10-05-2017, 03:12 AM
(This post was last modified: 10-05-2017 03:16 AM by Joe Horn.)
Post: #9
|
|||
|
|||
RE: Solve a System of complex equatoins
Most HP solvers, including cSolve, assume "=0" if the input expression is not an equation. You don't have to include it yourself. Prime's help screen for cSolve even says so explicitly:
HP Wrote:Syntax: (10-05-2017 02:19 AM)AlexFekken Wrote: Perhaps not necessary but perhaps it should. Expressions aren't equations, evaluating is not solving, etc. There's actually a reason for it working this way. The solvers treat "=" as "-" and solve the resulting expression (which is not an equation) for equality to zero. That being the case, it's more efficient for both the user and the calculator to omit "=0" from the input. <0|ɸ|0> -Joe- |
|||
10-05-2017, 04:48 AM
Post: #10
|
|||
|
|||
RE: Solve a System of complex equatoins
(10-05-2017 03:12 AM)Joe Horn Wrote: There's actually a reason for it working this way. The solvers treat "=" as "-" and solve the resulting expression (which is not an equation) for equality to zero. That being the case, it's more efficient for both the user and the calculator to omit "=0" from the input.I get the convenience of it, but I guess I am too much of a mathematician to appreciate the sloppiness. And a C programmer would probably argue that "!= 0" must have been omitted :-) |
|||
10-05-2017, 05:55 PM
Post: #11
|
|||
|
|||
RE: Solve a System of complex equatoins
(10-05-2017 04:48 AM)AlexFekken Wrote:(10-05-2017 03:12 AM)Joe Horn Wrote: There's actually a reason for it working this way. The solvers treat "=" as "-" and solve the resulting expression (which is not an equation) for equality to zero. That being the case, it's more efficient for both the user and the calculator to omit "=0" from the input.I get the convenience of it, but I guess I am too much of a mathematician to appreciate the sloppiness. And a C programmer would probably argue that "!= 0" must have been omitted :-) in most computer languages you can do this: if x then... and the language assumes you mean if x<>0 then... Tom L Cui bono? |
|||
10-06-2017, 07:44 AM
Post: #12
|
|||
|
|||
RE: Solve a System of complex equatoins | |||
10-06-2017, 02:56 PM
Post: #13
|
|||
|
|||
RE: Solve a System of complex equatoins
(10-05-2017 02:57 AM)kitsunekatari Wrote: In the Prime, you put in A, or X, it returns 0 because nothing is stored in it. So sometimes it's hard to check to see if an equation simplifies correctly. in the prime, that's easy too : go to CAS mode, and use lowercase Then you will see x will be x, not 0. primer |
|||
10-07-2017, 04:35 AM
Post: #14
|
|||
|
|||
RE: Solve a System of complex equatoins
(10-06-2017 07:44 AM)AlexFekken Wrote:(10-05-2017 05:55 PM)toml_12953 Wrote: in most computer languages you can do this: You're right. It's not very consistent, is it? Tom L Cui bono? |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)