# B How to determine D and E given A/(B-C)=D/B + E/C?

1. Dec 7, 2016

### Doug Brown

${ A \over B - C} = {D \over B} + {E \over C }$

Given the above equation and that A,B,C are known, how are the only two unknowns D and E determined from the knowns: A,B,C?

By the method of partial fractions, I could let $b \equiv \sqrt{B}$ and $c \equiv \sqrt{C}$ to rewrite the target where $B-C = (b+c)(b-c)$ but I see that as a dead end because D is defined over B not over (b+c). Therefore, pursuing a different approach the original equation may be written:
$${ A \over B - C } = {A \over B (1-{C\over B}) } = { D(1 - {C\over B}) \over B (1 - {C\over B}) } + { E \left( {B \over C} \left( 1-{C\over B} \right) \right) \over C \left( {B \over C} \left( 1-{C\over B} \right) \right)}$$
At this point all denominators are same so now exists one equation in two unknowns D & E:
$$A = { D(1 - {C\over B}) } + { E \left( {B \over C} \left( 1-{C\over B} \right) \right) } = { D(1 - {C\over B}) } + { E \left( {B \over C} - 1 \right) }$$
where the one equation in two unknowns is:
$$D = {A \over (1 - {C\over B}) } + E = {A \over B - C} B + E$$
But what can I use as the second equation?

Last edited: Dec 7, 2016
2. Dec 7, 2016

### Staff: Mentor

Looks like you have the yield of a portfolio and want to know what the contributions of single positions are.

I think all you can do is multiplying the whole thing with $BC(B-C)$ and compare single terms.

3. Dec 7, 2016

### Staff: Mentor

I don't see how this would be possible. You have one equation with five variables. If we treat A, B, and C as unknown constants (i.e., parameters), you still have one equation with two unknown variables. The best you can do is to solve for D in terms of A, B, C, and E, or solve for E in terms of A, B, C, and D.

4. Dec 7, 2016

### Staff: Mentor

If you know that D and E are integers, you might be able to narrow down the possible solutions. If they are positive integers, there might be a unique solution. It depends on A, B, C then.

5. Dec 7, 2016

### Staff: Mentor

If you don't have a second equation from your problem statement: Nothing.
Something went wrong in your steps, the final equation is wrong.

It's like asking to solve X=Y for both X and Y. It is impossible.

6. Dec 7, 2016

### Doug Brown

Thank you for your responses, however, my terminal did not alert me in real time to your comments so I have not digested them completely yet. From first glances I can say that:

A,B,C can be taken to be known. In fact they are functions of constants of nature, so they are known and do not need to be solved for. Only D and E are the unknown functions of A,B,C and hence of the fundamental constants of which A,B,C are defined. So this is not a problem with 5 unknowns just two. Please pardon the confusion.

Let me take a look at all the comments again and see if a second equation exists somewhere in this problem I have not yet observed

7. Dec 7, 2016

### Doug Brown

Not sure if I understand your suggestion but this is what I arrive at doing what I think this means
$$\left( A \over B - C \right) BC(B-C) = {D\over B} BC(B-C) + {E\over C} BC(B-C)$$
This reduces after standard algebra to
$$ABC = DC(B-C) + EB(B-C)$$
from which again one equation in two unknowns may be solved slightly different from my first equation
$$D = \left( A \over B - C \right) BC - EB$$
which actually is different from the first different equation for D I obtained now presented in initial posting of this thread. Subtracting the second equation from the first, eliminates D and the resulting expression for E becomes:
$$E = \left( A \over B - C \right) { C - 1 \over B + 1 } B$$
which does in fact solve for the unknown functions D and E in terms of the known functions A,B,C.

Now plugging back in my actual expressions for each of A,B,C would result in the equation I really need for this problem where the original goal was to separate the actual constants of Nature off into their own constant separate from the variables over which I wish to explore my solution of which the initial equation was a part. The point is I wanted to separate out all the constants to define them outside my for loops in my C++ code, so that my C++ for loops are only over my time and distance variables.

Therefore I thank fresh_42 for the financial advice for how I show individual portfolio contributions even though this is not a financial problem :)

8. Dec 7, 2016

### Doug Brown

Good point. I added extra problem definition which is that A,B,C are known (not unknowns) so this really is just a two unknown problem. You are right about your either/or comment. However, the portfolio trick does provide a second equation and result is now added at end of the thread. Thank you for your comment!

9. Dec 7, 2016

### Staff: Mentor

There is something wrong with your steps. You claim you can find unique numerical solutions to an equation of the type X=Y. That cannot work.

Example: A=2, B=2, C=1. What are D and E?

Plugging A, B, C into the equation gives 2/1 = D/2 + E, or simplified 4=D+2E. One solution is D=4, E=0, but another solution is D=0, E=2, and there is also D=2, E=1, and D=6, E=-1 and many other solutions.

You claim that there is just one solution, which is clearly wrong. You make mistakes in your steps, leading to new (and wrong) equations, and then call that progress...

10. Dec 7, 2016

### Staff: Mentor

This was meant as an illustration to show that it's not possible.

11. Dec 7, 2016

### Staff: Mentor

Well,
in your post #7 is actually $DC=(\frac{A}{B−C})BC−EB$

12. Dec 7, 2016

### Doug Brown

Yes you are totally correct. I did make an algebraic error. Thank you for pointing it out!

That now results in simply a final expression $E\left( {B \over C} - 1 \right) = 0$.

Introducing new information which is that B is arbitrary while C is a constant so their ratio can be other than unity (given their true meanings in my original problem, which is information you don't yet have) this then implies E=0 as the most general solution. This then implies that the equation for D results in a tautology with the original $A/(B-C)$ which means no second equation was obtainable by the "multiply by some function of the denominators" method.

Looks like there really is no way to get a second equation for D unless the original problem adds new information.

Again, thank you for pointing this out! I do stand corrected.

13. Dec 7, 2016

### Doug Brown

Please pardon me. I never intended to say that there is only one unique solution. I was only looking for any solution not any sort of only unique solution. I thought because of an algebraic error that this resulted in a 2nd equation for D but in the end once corrected, the benefit disappears as you suspected, and without any new information to provide a second equation, all I am left with is one equation in two unknowns, which is not a solution at all.

I wish the integer value solutions you found were applicable to my original problem but actually the A,B,C are real physical quanties which depend on fundamental constants of Nature so they don't match the solutions you provided. Although your testing method (just try a bunch of values and see if they fit) is worth pursuing.

However, I have already returned to my original problem and devised the needed code fix which turned out to be simple. Namely the easy solution is to invert it and no longer is there a difference in the denominator. The equation $(B-C)/A$ can now simply become $B/A-C/A$ which is a simple (once subtraction) code modification.

Thank you for taking a look and sharing your views, exploring this from all sorts of angles. Much appreciated.

Last edited: Dec 7, 2016
14. Dec 7, 2016

### Staff: Mentor

Well that is easy. Choose any value you like for D. Solve the equation for E (as function of A, B, C, D).