Solution of linear equation using Mathematica

Click For Summary

Discussion Overview

The discussion revolves around finding solutions to a system of linear equations using Mathematica. Participants share their experiences and challenges with implementing solutions in code, focusing on both specific examples and general advice for using Mathematica effectively.

Discussion Character

  • Technical explanation
  • Homework-related
  • Debate/contested

Main Points Raised

  • One participant requests help for solving a set of four linear equations using Mathematica.
  • Another participant points to a specific example from the Mathematica documentation, suggesting careful substitution of the user's equations.
  • A participant shares their attempt to solve a more complex system of equations but reports receiving an empty solution set.
  • There is a clarification that all constants in the equations are predefined, which may affect the solution process.
  • A suggestion is made to simplify the problem by creating a smaller example with defined constants to facilitate understanding and troubleshooting.
  • One participant acknowledges the complexity of their constants and expresses intent to try simpler values for further assistance.

Areas of Agreement / Disagreement

Participants do not reach a consensus, as there are varying levels of understanding and complexity in the equations being discussed. Some participants express frustration with the lack of clarity in the problem setup.

Contextual Notes

Limitations include the complexity of the constants involved and the need for clearer definitions or examples to aid in finding a solution. The discussion reflects uncertainty regarding the appropriate approach to take in Mathematica.

adnan jahan
Messages
93
Reaction score
0
Please anyone can help me for finding solution of linear equation by using mathematica,

for example take us equations as,

9x+10y+7z+18 w=8
3x-3y-8z+88 w=0
12x+9y-17z-14w=2
x+y-2z+w=0

Infect I have to use this thing in my code which will be good by using this thing,,,

Any suggestion will be appreciated.
 
Physics news on Phys.org
Look carefully at the second example on this web page:

http://reference.wolfram.com/mathematica/ref/Solve.html

That shows how to do this with two equations and two unknowns.

Mathematica is extremely demanding, but from the example (which is also available via Help in your Mathematica) you should be able to carefully substitute your four equations and variables and get the answer you need.
 
my equations are bit complecated I tried that steps but could not get any solution should I V = {{H61, H62, H63, H64, H65}, {H71, H72, H73, H74, H75}, {k1*H31,
k2*H32, k3*H33, k4*H34, k5*H35}, {H41, H42, H43, H44, H45}, {H11,
H12, H13, H14, H15}};
V. {x, y, q, e, r} == {-p, 0, 0, 0, f}
Solve[V.{x, y, q, e, r} == {-p, 0, 0, 0, f}, {x, y, q, e, r}]result I got is
{(-9.36962 - 0.00479499 I) e - (9.376 + 0.0287764 I) q - (9.43042 +
0.00480491 I) r - (9.39997 + 0.0384002 I) x - (9.424 +
0.0288234 I) y, (-15.9923 - 0.0012228 I) e - (15.994 +
0.007308 I) q - (16.0075 + 0.0011772 I) r - (16.0001 +
0.0096 I) x - (16.006 + 0.007092 I) y, (-8.12243*10^-25 -
5.14424*10^-24 I) e - (4.87349*10^-24 +
4.06129*10^-24 I) q - (8.12243*10^-25 - 5.14424*10^-24 I) r -
6.49805*10^-24 x - (4.87349*10^-24 -
4.06129*10^-24 I) y, (1.88504*10^-13 +
5.37235*10^-20 I) e + (1.88504*10^-13 +
2.5448*10^-19 I) q + (1.88504*10^-13 - 5.37235*10^-20 I) r +
1.88504*10^-13 x + (1.88504*10^-13 -
2.5448*10^-19 I) y, (-3.29661*10^-42 -
1.03546*10^-63 I) e - (3.29661*10^-42 +
1.25698*10^-63 I) q - (3.29661*10^-42 - 1.03546*10^-63 I) r -
3.29661*10^-42 x - (3.29661*10^-42 - 1.25698*10^-63 I) y} == {-10,
0, 0, 0, 0.5}
and for solution is
{}
 
sorry all the above constants are predefined, means p,f,Hs are all defined
 
adnan jahan said:
sorry all the above constants are predefined, means p,f,Hs are all defined

If you can, just for the purpose of being able to get an answer to your question, create a small example notebook with

H61=2; H62=4; H63=3.1; etc. containing all and exactly what you are trying to solve and
getting rid of all unneeded information but keeping exactly what is needed for the problem

and then copy exactly what you are trying to solve into a posting

then I will try to make sense of what you are doing and show how to get a solution.

I assume you can understand how difficult it would be if some student wandered into your office and said "I have some equations and some numbers and I can't solve it, but you can't see what I have, what do I do?"
 
Bill Simpson said:
"I have some equations and some numbers and I can't solve it, but you can't see what I have, what do I do?"
You are right I let me try for simple values and then I will be in touch,
my constants are complexed values basically
thanks a lot,
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
6
Views
2K
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K