Algebra in Excel

S

sstexas

Is there a way to calculate algebraic equations in Excel?
I have the equation:
50a+100b=60 and
100a+50b=45
I know how to solve these by hand, but is there a way to solve them in Excel?
 
R

Rick Rothstein \(MVP - VB\)

Is there a way to calculate algebraic equations in Excel?
I have the equation:
50a+100b=60 and
100a+50b=45
I know how to solve these by hand, but is there a way to solve them in
Excel?

First Equation
=============
Put the coefficient of 'a' in A1, the coefficient of 'b' in B1 and the
constant in C1

Second Equation
=============
Put the coefficient of 'a' in A2, the coefficient of 'b' in B3 and the
constant in C2

Solution for 'a'
=============
A4: =(B2*C1-B1*C2)/(A1*B2-A2*B1)

Solution for 'b'
=============
A5: =(C1-A4*A1)/B1

Notice the dependency in A5's calculation on the cell A4 (in case you decide
to move the solution cell for 'b' to some other location).

Rick
 
P

PBezucha

Why not to exploit useful math features of Excel?
Generally (it applies for arbitraly count of linear equations) and comfy:

arrange your set of coefficients as follows

50 100
100 50

60 100
45 50

50 60
100 45

e.g. in the second and third arrays replace the first and second column with
the coefficients from the right side. Apply Excel function MDeterm for each
of these arrays (called square matrix) as arguments. And now simply divide
the second (-1500) and third (-3750) results of this function by the first
one (-7500) whereby you obtain your values for a (0.2) and b (0.5).

Regards
Petr
 
J

joeu2004

Is there a way to calculate algebraic equations in Excel?
I have the equation:
50a+100b=60 and
100a+50b=45
I know how to solve these by hand, but is there a way to solve them in Excel?

Look at Tools > Solver. It solved those equations easily.

For example, blank out A1 and B1, and put the following formula into
C1:

=50*A1 + 100*B1

Click on Tools > Solver, set Target Cell to $C$1, set Equal to Value
of 60, and set By Changing Cells to $A$1:$B$1. Then click on Solve.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top