Using mathematica to reduce a system of n equations and m variables

Click For Summary

Discussion Overview

The discussion revolves around reducing a system of six equations with thirteen variables to a system with seven free parameters using Mathematica. Participants explore different strategies and considerations related to the computational challenges and theoretical aspects of the problem.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes their attempt to use Mathematica's Reduce function but encounters significant computational delays, suggesting a need for a more efficient method.
  • Another participant questions the feasibility of reducing the system, noting that with too many variables and too few equations, there may be an infinite number of solutions, complicating the reduction process.
  • A different viewpoint asserts that if the variables are not independent, it is possible to reduce the system to seven independent variables based on the number of equations provided.
  • One participant proposes that for under-determined systems, it may be possible to select any variables as "free" variables, although this may not yield an elegant solution.
  • Concerns are raised about the potential for contradictory equations within the system, which could hinder the reduction process.
  • Another participant emphasizes that the goal is not to solve the system but to reduce it to a form with fewer variables and no constraints.
  • A suggestion is made to examine specific relationships within the equations to identify potential reductions in the number of variables.
  • One participant recommends experimenting with the Eliminate function in Mathematica, noting that while it may simplify the system, it could also complicate the remaining equations.

Areas of Agreement / Disagreement

Participants express differing views on the feasibility and methods for reducing the system. There is no consensus on the best approach, and the discussion remains unresolved regarding the optimal strategy for achieving the desired reduction.

Contextual Notes

Participants acknowledge the complexity of the equations and the potential for contradictions, which may affect the ability to reduce the system effectively. The discussion highlights the dependence on the relationships between variables and the nature of the equations involved.

Who May Find This Useful

This discussion may be useful for individuals interested in computational methods for solving systems of equations, particularly in the context of using Mathematica for mathematical modeling and analysis.

McLaren Rulez
Messages
289
Reaction score
3
Hi guys,

I have a system of six equations and thirteen variables. I would like to reduce it to seven free parameters. I used Reduce to solve it but it is taking really long (one full day and no output yet) and I think there must be a better way. Here is my code

Code:
Y = {{y1}, {y2}, {y3}} 
T = {{t11, t12, t13}, {t21, t22, t23}, {t31, t32, t33}} 
K = k*IdentityMatrix[3]

M = Y.Transpose[Y] + T.Transpose[T] - K %This is a symmetric matrix

Reduce[M[[1]][[1]]==0&&M[[1]][[2]]==0&&M[[1]][[3]]==0&&M[[2]][[2]]==0&&M[[2]][[3]]==0&&M[[3]][[3]]==0, Reals]

What should I do to speed this up? I'm sure if I spent a few hours, I could do it by hand but surely, there is a simple way to do it in Mathematica or other software? Thanks!
 
Physics news on Phys.org
Well, it's been a while; but, how do you figure you can reduce this system?

I don't know Mathematica, nor what you are doing there.

From what I remember, you seem to have a system of "too many" unknowns and "too few" equations. If those variables of yours are true state variables (i.e., they are linearly independent from each other), I am afraid there is nothing you can do to reduce your system; instead, you simply have too many solutions and you need to figure out which one you want.
 
If I give you n variables and m constraints, you can get n-m independent variables. My thirteen variables are not independent (they are related to each other by six equations). I want to reduce is to 13-6=7 independent variables.

A simplistic example of three variables and two equations: x+y+z=2 and x-y=3, you can give me one independent variable, say x. Thus we have x, y=x-3 and z=5-2x.
 
Oh. I see. I kind of understand, now. But I saw 2 equations and 3 unknowns before and I still see 2 equations and 3 unknowns afterwards; except that, now, you have 1 variable that you have chosen to call "free" but needs to be set to something and what remains becomes a square, solvable system.

So, for an under-determined system like this one, can you just pick any unknowns as your "free" variables?

And, without manipulating your original equations, can't you simply assign numeric values to the picked "free" variables, plug the values in and let the system become square and solvable? May not be as elegant...
 
Maybe this is what is happening. In general,you might still have a subset of equations that is contradictory. Then additional variables will not turn an unsolvable problem into a solvable one unless you change that subset of equations. But you would think that the program would quickly spot that problem and tell you.

EQ1: x1=1
EQ2: x1=2
EQ3: x2+x3+x4+x5 = 0
 
It is a real system (I didn't make the equations up) so it shouldn't be contradictory. You are also right that Mathematica will immediately spot a contradiction because I artificially changed the code to try that.

gsal, the point is not to solve the system. The point is to reduce the system from having thirteen variables and six constraints to seven variables and no constraints. Then, any values for those seven variables represents a valid state of the system.
 
McLaren Rulez said:
It is a real system (I didn't make the equations up) so it shouldn't be contradictory.
I see. So it is hard to explain why Mathematica is hung up. It seems like a small set of linear equations should be easy for it. Is your computer memory large enough? I have no other ideas.
You are also right that Mathematica will immediately spot a contradiction because I artificially changed the code to try that.
Good to know. Thanks.
 
If you look at the first two rows of M you can immediately see the value of k

Code:
k == t11^2 + t12^2 + t13^2 + y1^2 == t21^2 + t22^2 + t23^2 + y2^2

That reduces the number of variables and number of equations by one.
 
You can also experiment with Eliminate. That can sometimes get rid of one variable, and sometimes one equation, but the remaining equations are often considerably more complicated. If the result wasn't too much more complicated then you can sometimes more quickly solve the smaller system and backtrack to get the value of the eliminated variable. And you can try eliminating more than one variable, but the increasing complexity may take much longer than the original problem.
 

Similar threads

  • · Replies 19 ·
Replies
19
Views
3K
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
3
Views
3K
Replies
0
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K