Google Answers Logo
View Question
 
Q: Algebra - Two Equations and Two Unknowns ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: Algebra - Two Equations and Two Unknowns
Category: Science > Math
Asked by: bravelobster-ga
List Price: $10.00
Posted: 23 Jul 2002 11:09 PDT
Expires: 22 Aug 2002 11:09 PDT
Question ID: 44193
Given the two equations below:
c1 = 0.5*c2*[A*(x-D)^2+B*(y-D)^2] + c3/c2*D*[A(x-D)+B(y-D)] ; and
A(x-D) = B(y-D)

All values other than x & y are constants.  Can a solution for (x+y)
be found in terms of constants only?  Or, if any easier, a solution as
[(x-D)+(y-D)]?

Request for Question Clarification by philip_lynx-ga on 24 Jul 2002 06:08 PDT
Hi bravelobster,

I hope this is no school homework? I have seen several questions from
you, and I wonder what your motivation is... It would be nice to know
;-) Please also have a look at point #34 in
https://answers.google.com/answers/researcherguidelines.html

Anyway. Given y = A/B(x-D)+D, your first equation can in fact be
solved for x in dependency of constants only. The solution is ugly, it
may simplify for x+y. So the 'short' answer to your question is 'YES'
;-))

I may be able to provide you a better visualization for a solution if
you have values for the constants, as the equations correspond to nice
geometric figures. Or I can simply paste you the solution for x
(and/or x+y) as an answer.

Please tell me how you want to proceed.

Clarification of Question by bravelobster-ga on 24 Jul 2002 07:09 PDT
Hello  philip_lynx-ga ,

The problem is work related. I'm not a student, although maybe I
should consider returning to brush up on my feeble math skills. 
Unfortunately, I can not assign numerical values to the constants.  c1
is an output from an equally ugly equation, and the other constants
are dependant upon material parameters, each of which must be
optimized based on the overall results.  Pasting a solution for x+y
would be most appreciated.

Thanks very much...
Answer  
Subject: Re: Algebra - Two Equations and Two Unknowns
Answered By: rbnn-ga on 24 Jul 2002 08:37 PDT
Rated:5 out of 5 stars
 
Unfortunately I was not able to find a crisp and short solution here.

Sometimes it is helpful to know a bit more about the background of a
problem; sometimes there are problem-specific constraints that can
simplify things. On the other hand, if you just need a formula to plug
into a computer program, then what's below should help you.

If you want I can send you some Java code that computes what I'm
doing, in the form of a big function that takes all the constants as
parameters. For simplicity though, the Java code will probably assume
that
solutions are real. But what's below might be clearer:


Given the two equations below: 

(1)  c1 = 0.5*c2*[A*(x-D)^2+B*(y-D)^2] + c3/c2*D*[A(x-D)+B(y-D)]
and 

(2)  A(x-D) = B(y-D)

We assume that c2 is nonzero, since it's a denominator in the
equation.

We divide up the solution into 4 cases, depending on which of A and B
are zero.
We have to do this to make sure we don't divide by zero anywhere.

Case 1: A is nonzero and B is nonzero.

Let 

(3)    z=A(x-D)

Hence we have,

(3')   z=B(y-D)

Then A*(x-D)^2 = A*(x-D)*(x-D) = z*(x-D) = z*z/A=z^2/A.
Similarly, B*(y-D)^2= z^2/B.

Hence, equation (1) becomes:

c1=0.5*c2 * (1/A+1/B))*z^2+c3/c2*D*2*z


Let 

(3)    a=.5*c2* (1/A+1/B)

and let

(4)    b=c3/c2*D*2

Then our equation becomes:

a*z^2 + b*z - c1 = 0

Case 1.1: A is not equal to -B

In this case, a is not equal to 0, so we can write:

(5)   z= (-b + sqrt(b^2 + 4a(c1)))/2a
(5')  z= (-b - sqrt(b^2 + 4a(c1)))/2a

Now, 
x=z/A+D
y=z/B+D

Now you can just compute 
(6)   x+y=((1/A+1/B)*z + 2*D)

I am not actually writing out x+y in one big equation here, since for
most cases, including input to a computer program, it's easier and
safer to split up the equation using the temporary terms z, a, b and
so on.


Note that there may be two distinct possibilities for z, and thus in
general for x+y, unless 4a(c1)=-b^2, in which case there is only one
solution to the quadratic.

Note that if 4a(c1) is smaller than -b^2 then both solutions will be
complex nonreal.  (You hadn't specified whether you want to limit to
real solutions; if so, consider this case as "no solution").

Case 1.2: A=-B

Here, a is zero and we have the linear equation:

b*z - c1 = 0

This has solutions, by inspection, as follows: 

 Case 1.2.1 If b is 0 and c1 is 0 all z are solutions

 Case 1.2.2 If b is 0 and c1 is nonzero, there are no
solutions.

 Case 1.2.3 If b is nonzero, then z=(c1)/b .

Just as in case 1.1, you can recover x+y from the value of z using
equation (6).

Case 2: A is nonzero and B is zero

In this case, we must have x=D by equation (2). By inspection of
equation 1,
if c1 is 0 then solutions are x=D and all y; if c1 is nonzero, then
there are no solutions.

Case 3: A is zero and B is nonzero

Similar to case 2, except solutions are y=D if c1 is 0, and no
solutions otherwise.

Case 4: A is zero and B is zero

Here, if c1 is zero, all x,y are solutions; otherwise there are no
solutions.
bravelobster-ga rated this answer:5 out of 5 stars
Very clear and thorough.  Exactly what I was looking for.  Thanks.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy