Solution of linear equation using Mathematica

In summary, the author is asking for help solving a linear equation. They state that the equations are complexed and provide a list of predefined constants. They ask for help solving the equation for a specific value and provide a link to a small example notebook.
  • #1
adnan jahan
96
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
  • #2
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.
 
  • #3
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
{}
 
  • #4
sorry all the above constants are predefined, means p,f,Hs are all defined
 
  • #5
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?"
 
  • #6
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 alot,
 
1.

What is Mathematica and how does it solve linear equations?

Mathematica is a computational software program used by scientists and mathematicians to perform complex mathematical calculations. It uses algorithms and built-in functions to solve linear equations, which are equations in the form of y=mx+b where x and y are variables, m is the slope, and b is the y-intercept.

2.

How do I input a linear equation into Mathematica?

To input a linear equation, you can use the "Solve" function in Mathematica. For example, if the equation is y=3x+5, you would type "Solve[y==3x+5, x]" into the Mathematica command line. You can also use the "Manipulate" function to graph the equation and see the solution visually.

3.

Can Mathematica solve systems of linear equations?

Yes, Mathematica can solve systems of linear equations, which are multiple equations with multiple variables. You can use the "Solve" function with multiple equations and variables, or you can use the "LinearSolve" function to solve a system of equations in matrix form.

4.

What are the advantages of using Mathematica to solve linear equations?

One of the main advantages of using Mathematica is its ability to handle complex calculations and large amounts of data. It also has built-in functions for different types of equations, making it a powerful tool for solving linear equations. Additionally, Mathematica provides visual representations of equations and solutions, making it easier to understand and analyze the results.

5.

Is Mathematica suitable for all types of linear equations?

Yes, Mathematica can solve all types of linear equations, including equations with multiple variables, systems of equations, and equations with complex numbers. It also has functions for solving specific types of linear equations, such as quadratic and exponential equations.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
262
  • Precalculus Mathematics Homework Help
Replies
6
Views
636
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
277
  • Calculus and Beyond Homework Help
Replies
2
Views
93
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
3K
Back
Top