Need help to solve simultaneous equation in Mathematica

  • Mathematica
  • Thread starter kaizen.moto
  • Start date
  • Tags
    Mathematica
In summary, the conversation discusses difficulties with solving simultaneous equations using Mathematica. The suggested solution is to use CoefficientArrays to turn the equations into a matrix problem, but it is noted that there may be multiple solutions due to degenerate singular values. There is also a mention of small imaginary numbers, which are confirmed to be correct. The use of CoefficientArrays and SingularValueList[m] is unfamiliar to the individual, who is still learning how to use Mathematica.
  • #1
kaizen.moto
98
0
Hi everyone, please help me to solve my difficulties with regard to simultaneous equations using Mathematica.

Thanks for any response.
 

Attachments

  • Exercise1-1.nb
    55.1 KB · Views: 450
Physics news on Phys.org
  • #2
It looks like your system of equations does not have a solution. You might try using CoefficientArrays to turn it into a matrix problem.

EDIT: Hmm, something seems strange. I turned this into a matrix problem by

{b, m} = CoefficientArrays[eqn, vars]

And it turns out that Det[m] gives a non-zero result, so there should be a solution. And, in fact, Inverse[m].b gives a good array of coefficients. However, SingularValueList[m] shows that there are a lot of degenerate singular values, so the singular value decomposition is not unique. I don't know if that means that maybe there is not a unique solution.

Are the small imaginary numbers correct, or can we Chop those off?
 
Last edited:
  • #3
Thanks for reply..

Actually, I have chopped off the real values of U1, U2, V1 and V2, because they are too lenghty, and I could not fit in the attachement file. Perhaps, if I use the full expressions of U1, U2, V1 and V2, it would give me the good response. I don't know if I could send you the complete file.

Yes the imaginary parts are very small, they are correct. I think I just better keep them throughout.

By the way, I have checked from the manual and books, I really don't have idea how the CoefficientArrays and SingularValueList[m] works as Iam relatively new to Mathematica. For now, Iam trying to figure out what those terms mean and help me to solve my problems.

Thanks anyway.
 

What is a simultaneous equation?

A simultaneous equation is a set of two or more equations that must be solved at the same time. Each equation contains multiple variables, and the goal is to find the values of these variables that satisfy all of the equations.

How do I input simultaneous equations in Mathematica?

To input simultaneous equations in Mathematica, you can use the "Solve" function. Each equation should be separated by a comma, and you can use the "&&" symbol to indicate that the equations should be solved simultaneously.

Can Mathematica solve all types of simultaneous equations?

No, Mathematica can only solve certain types of simultaneous equations. It works best with linear equations and may struggle with more complex equations. It is always best to check the documentation or try using a different method if your equations are not being solved.

How do I check if the solutions to my simultaneous equations are correct?

You can easily check the solutions by substituting the values into the original equations and seeing if they satisfy the equations. You can also use the "CheckSolutions" function in Mathematica to verify the solutions.

Are there any other methods I can use to solve simultaneous equations in Mathematica?

Yes, there are other methods such as using the "Eliminate" function or using matrix operations. You can also try using the "FindRoot" function to approximate solutions. It is always a good idea to try different methods to see which one works best for your specific equations.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
357
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
145
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
201
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
776
Back
Top