ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Two unknown variable equation (https://www.excelbanter.com/excel-worksheet-functions/76546-two-unknown-variable-equation.html)

John

Two unknown variable equation
 
Hi,

I'm trying to figure out this problem:

3x + 2y = 16
5x - 3y = -5

What is x? What is y?

x=2 y=5

I can do it on paper. Can it be done in excel? If so, how?

Thank you,
John

Gary L Brown

Two unknown variable equation
 
Actually, x and y have infinite values. For example, using the 1st equation
[3x + 2y = 16],
when...
x = 0, y = 8
x = 1, y = 6.5
x = 2, y = 5
etc, etc, etc

An example...
Cell Value
A1 0
A2 1
A3 2

B1 = =(16-(3*A1))/2
B2 = (16 -(3*A2))/2
B3 = (16 -(3*A3))/2

HTH,
--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.


"John" wrote:

Hi,

I'm trying to figure out this problem:

3x + 2y = 16
5x - 3y = -5

What is x? What is y?

x=2 y=5

I can do it on paper. Can it be done in excel? If so, how?

Thank you,
John


John

Two unknown variable equation
 
On Fri, 10 Mar 2006 10:16:30 -0800, Gary L Brown
wrote:

Actually, x and y have infinite values. For example, using the 1st equation
[3x + 2y = 16],
when...
x = 0, y = 8
x = 1, y = 6.5
x = 2, y = 5
etc, etc, etc

An example...
Cell Value
A1 0
A2 1
A3 2

B1 = =(16-(3*A1))/2
B2 = (16 -(3*A2))/2
B3 = (16 -(3*A3))/2

HTH,


Thanks for the assistance, Gary. Unfortunately, I wasn't specific
enough. Both equations are supposed to be part of the same problem. So
only when x=2 and y=5 will you solve both equations. The question is
how do you express this in excel.

Thanks.

"John" wrote:

Hi,

I'm trying to figure out this problem:

3x + 2y = 16
5x - 3y = -5

What is x? What is y?

x=2 y=5

I can do it on paper. Can it be done in excel? If so, how?

Thank you,
John


Dana DeLouis

Two unknown variable equation
 
3x + 2y = 16
5x - 3y = -5


If you place 3,2,16 in A1:A3
and 5,-3,-5 in B1:B3
then...

[x] = (B2*C1 - B1*C2)/(A1*B2 - A2*B1)

[y] = (A2*C1 - A1*C2)/(A2*B1 - A1*B2)

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"John" wrote in message
...
On Fri, 10 Mar 2006 10:16:30 -0800, Gary L Brown
wrote:

Actually, x and y have infinite values. For example, using the 1st
equation
[3x + 2y = 16],
when...
x = 0, y = 8
x = 1, y = 6.5
x = 2, y = 5
etc, etc, etc

An example...
Cell Value
A1 0
A2 1
A3 2

B1 = =(16-(3*A1))/2
B2 = (16 -(3*A2))/2
B3 = (16 -(3*A3))/2

HTH,


Thanks for the assistance, Gary. Unfortunately, I wasn't specific
enough. Both equations are supposed to be part of the same problem. So
only when x=2 and y=5 will you solve both equations. The question is
how do you express this in excel.

Thanks.

"John" wrote:

Hi,

I'm trying to figure out this problem:

3x + 2y = 16
5x - 3y = -5

What is x? What is y?

x=2 y=5

I can do it on paper. Can it be done in excel? If so, how?

Thank you,
John




Dana DeLouis

Two unknown variable equation
 
3x + 2y = 16
5x - 3y = -5


I should have added. Another option is:

If you place 3,2,16 in A1:A3
and 5,-3,-5 in B1:B3
then select 2 vertical cells and array enter the following:

=MMULT(MINVERSE(A1:B2),C1:C2)

or select 2 horizontal cells and array enter the following:

=TRANSPOSE(MMULT(MINVERSE(A1:B2),C1:C2))

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"Dana DeLouis" wrote in message
...
3x + 2y = 16
5x - 3y = -5


If you place 3,2,16 in A1:A3
and 5,-3,-5 in B1:B3
then...

[x] = (B2*C1 - B1*C2)/(A1*B2 - A2*B1)

[y] = (A2*C1 - A1*C2)/(A2*B1 - A1*B2)

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"John" wrote in message
...
On Fri, 10 Mar 2006 10:16:30 -0800, Gary L Brown
wrote:

Actually, x and y have infinite values. For example, using the 1st
equation
[3x + 2y = 16],
when...
x = 0, y = 8
x = 1, y = 6.5
x = 2, y = 5
etc, etc, etc

An example...
Cell Value
A1 0
A2 1
A3 2

B1 = =(16-(3*A1))/2
B2 = (16 -(3*A2))/2
B3 = (16 -(3*A3))/2

HTH,


Thanks for the assistance, Gary. Unfortunately, I wasn't specific
enough. Both equations are supposed to be part of the same problem. So
only when x=2 and y=5 will you solve both equations. The question is
how do you express this in excel.

Thanks.

"John" wrote:

Hi,

I'm trying to figure out this problem:

3x + 2y = 16
5x - 3y = -5

What is x? What is y?

x=2 y=5

I can do it on paper. Can it be done in excel? If so, how?

Thank you,
John






John

Two unknown variable equation
 
On Fri, 10 Mar 2006 14:08:59 -0500, "Dana DeLouis"
wrote:

3x + 2y = 16
5x - 3y = -5


I should have added. Another option is:

If you place 3,2,16 in A1:A3
and 5,-3,-5 in B1:B3
then select 2 vertical cells and array enter the following:

=MMULT(MINVERSE(A1:B2),C1:C2)

or select 2 horizontal cells and array enter the following:

=TRANSPOSE(MMULT(MINVERSE(A1:B2),C1:C2))


Thank you for both posts. I very much appreciate it.

One question though, I notice for both examples above the answer in
the cell was 2 while when I clicked on the formula it showed {2,5}. Is
there a way to show both.

Thanks again,
John

Duke Carey

Two unknown variable equation
 
The key part is to select 2 vertical cells and

ARRAY ENTER

the formula. That means you commit the formula by pressing

Ctrl-Shift-Enter

"John" wrote:

On Fri, 10 Mar 2006 14:08:59 -0500, "Dana DeLouis"
wrote:

3x + 2y = 16
5x - 3y = -5


I should have added. Another option is:

If you place 3,2,16 in A1:A3
and 5,-3,-5 in B1:B3
then select 2 vertical cells and array enter the following:

=MMULT(MINVERSE(A1:B2),C1:C2)

or select 2 horizontal cells and array enter the following:

=TRANSPOSE(MMULT(MINVERSE(A1:B2),C1:C2))


Thank you for both posts. I very much appreciate it.

One question though, I notice for both examples above the answer in
the cell was 2 while when I clicked on the formula it showed {2,5}. Is
there a way to show both.

Thanks again,
John



All times are GMT +1. The time now is 07:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com