# Linear system of exponential equations

## Homework Statement

Consider the system of equations

$$\begin{eqnarray*} e_1 &=& Ak^p + Bh^q \\ e_2 &=& A(k/2)^p + Bh^q \\ e_3 &=& Ak^p + B(h/2)^q \\ e_4 &=& A(k/2)^p + B(h/2)^q \end{eqnarray*}$$

Suppose that the $e_i$ are known, as well as k and h. Find A, B, p, and q.

## Homework Equations

It's worth noting that a simpler case of this is

$$\begin{eqnarray*} e_1&=& Ak^p \\ e_2 &=& A(k/2)^p \end{eqnarray*}$$

Then to get the solution, you divide $e_1/e_2 = 2^p$, allowing you to solve for p.

## The Attempt at a Solution

I've tried a bunch of different combinations of the $e_i$'s, but I always seem to have something like $Ak^p(1-1/2^p)$ attached to each other, preventing me from solving for one. For example,

$$\begin{eqnarray*} e_1-e_2 &=&Ak^p(1-1/2^p) \\ &=&e_3-e_4 \\ e_2-e_4 & = & Bh^q(1-1/2^q) \\ &=&e_1-e_3 \\ (e_1-e_2)(e_2-e_4)&=& Ak^pBh^q(1-1/2^p)(1-1/2^q) \\ p &=& \log_2\frac{e_1-Bh^q}{e_2-Bh^q} \end{eqnarray*}$$

So I basically keep getting expressions that are useless, since you can't really solve for one in terms of the others. Does anyone have any ideas or experience with this sort of thing? Thanks in advance!

SteamKing
Staff Emeritus
Homework Helper
Absent some magical combination of known values of k and h, iteration is one way to obtain a solution. Another might be use of Newton-Raphson.

I like Serena
Homework Helper
Hi tjackson3! The generic method is to pick an equation, and isolate one of the variables.
Then you substitute that in the other equations.
And repeat.

Each time you will have one equation less and one variable less, since that will have been eliminated.

\begin{eqnarray*}
e_1&=& Ak^p \\
e_2 &=& A(k/2)^p
\end{eqnarray*}

Rewrite the first equation to $A=e_1 k^{-p}$ and substitute in the second:
$e_2 = (e_1 k^{-p})(k/2)^p$
$e_2 = e_1 2^{-p}$
This leaves you with 1 equation and 1 unknown (p).
After you have solved it, you go back and calculate A.

Prof. Forman Acton of Princeton, in the "What Not To Compute" section of his book "Numerical Methods That Work" writes concerning the equation,

$$\begin{eqnarray*} e_1 &=& Ak^p + Bh^q \\ \end{eqnarray*}$$
"Unfortunately there is a companion problem [it's the one you just described] that looks only slightly more complicated -- until you try it! We again have several readings from a radioactive sample, but the decaying materials are not known, hence the decay rates p and q must also be fitted. The answer to this problem lies in the chemical rather than the computer laboratory, and the sooner the hopeful innocent can be sent there and away from the computer room, the better off everyone will be. For it is well known that an exponential equation of this type in which all four parameters are to be fitted is extremely ill conditioned. That is, there are many combinations of (p, q, A, B) that will fit most exact data quite well indeed (will you believe four significant figures?) and when experimental noise is thrown into the pot, the entire operation becomes hopeless."

A word to the wise: You can certainly solve the system, but be very, very cautious about drawing any conclusions from your solutions. It would be a good idea to run a series of numerical experiments varying the e's slightly in order to get a handle on the sensitivity of the system.

Ray Vickson
Homework Helper
Dearly Missed
Set x1=Ak^p, x2=Bh^q, x3=A(k/2)^p and x4 = B(h/2)^q. Solve for x1,...,x4. Now your problem reduces to one you have already solved.

RGV

Last edited:
SteamKing: Unfortunately, I need to find an analytic solution to this.

I Like Serena: Hi! :) The problem I run into there is the fact that there are two exponents, which makes solving for the last one difficult. Here's what I did. I started off by solving for A: $A = (e_1-Bh^q)k^{-p},$ using the first equation. Then I used the second equation to get

$$B = \frac{(e_1-e_3)h^{-q}}{1-1/2^q}$$

Then using the fourth equation, I get

$$p = -\log_2\left[\left(1-1/2^q)\frac{e_4-e_1}{e_1-e_3}-\frac{1}{2^q}\right]$$

But then I have no clue about now to get q from that.

obafgkmrns: That's a very interesting quote, and it's something that has been brought up in my numerical PDE class. Of course, that was right after he asked us to solve it for homework, so take what you will from that. As an aside, that seems like a very interesting book.

Ray Vickson: I just tried that, but that linear system doesn't have a solution.

I like Serena
Homework Helper
I Like Serena: Hi! :) The problem I run into there is the fact that there are two exponents, which makes solving for the last one difficult. Here's what I did. I started off by solving for A: $A = (e_1-Bh^q)k^{-p},$ using the first equation. Then I used the second equation to get

$$B = \frac{(e_1-e_3)h^{-q}}{1-1/2^q}$$

Then using the fourth equation, I get

$$p = -\log_2\left[(1-1/2^q)\frac{e_4-e_1}{e_1-e_3}-\frac{1}{2^q}\right]$$

But then I have no clue about now to get q from that.

Uhh... :uhh: You're supposed to have 2 equations left, each with p and q.
Isolate p, what you apparently did, and substitute in the last equation.
Btw, I recommend solving for u=2-p and v=2-q instead. It's easier on the powers and logs.
It also helps to introduce extra constants for complex sub-expressions to keep things manageable.

That was the best tip. I am concerned because I never really used the fourth equation except in passing, but I'm less worried than I might be because I know all of the e's are related by the equations I posted in the OP. So please tell me if this sounds right. I started off solving for A in the same way as I did previously. For B, I used equation 2 to get that

$$B = \frac{(e_2-e_1u)h^{-q}}{1-u}$$

However, I also figured out last time that we also had

$$B = \frac{(e_1-e_3)h^{-q}}{1-u}$$

Setting these equal to each other, I get that

$$u = \frac{e_2+e_3-e_1}{e_1}$$

In terms of this, then,

$$\begin{eqnarray*} A & = & (e_1 - x)k^{-p} \\ B & = & xh^{-q} \\ x & = & \frac{e_1-e_3}{e_1-e_4} \end{eqnarray*}$$

x was originally $(e_1-e_3)/(2e_1-e_2-e_3)$, but I used the relations in the OP to clean up slightly. Now using the third equation,

$$e_3 = (e_1-x) + xv \Rightarrow v = \frac{e_3-e_1+x}{x}$$

So now I have an expression for the unknowns (A,B,q,p,u,v) in terms of the e's. Does all that seem right? I'm still worried about not using equation 4 or making any sort of reference to k and h in the final solution, but maybe that's supposed to be right. This equation refers to the error in a numerical method for solving a PDE, where k is the space step and h is the time step.

I like Serena
Homework Helper
But it's not possible to solve all 4 unknowns without using all 4 equations.

You did pluck an equation out of the air without any reference to how you got it...
Is there any chance you made a mistake?

Btw, your final solution (at least for A and B) should contain h and k.

Which equation are you referring to? Also, the only reason I think it might be possible to solve this system without using all three equations is that they're not linearly independent (for example, the fourth equation is $e_2 + e_3 - e_1$)

edit: Haha also I just noticed that A and B do have h and k. Silly me. Sorry about that

I like Serena
Homework Helper
Which equation are you referring to? Also, the only reason I think it might be possible to solve this system without using all three equations is that they're not linearly independent (for example, the fourth equation is $e_2 + e_3 - e_1$)

edit: Haha also I just noticed that A and B do have h and k. Silly me. Sorry about that

You have 2 different equations for B that are both apparently derived from equation 2.
That does not seem right.

Btw, if the equations would be linearly dependent, you can not solve it at all.
That is, then there won't be a unique solution.

I am starting to wonder about the second one. It makes reference to $e_3$, but I apparently derived it from the second equation. I'll rework that.

Is that true for equations with nonlinear terms though? I know it's true for typical linear equations, but this seems to be sort of a mix. It is linearly dependent, though.

I like Serena
Homework Helper
Ah, I see what you mean about dependent.
That is why you didn't follow RGV's suggestion.
But then I don't think you can solve the set of equations.
I think you'll find that if you do the final substitution in the 4th equation, that the equation disappears and leaves something like 0=0.

Ray Vickson
Homework Helper
Dearly Missed
SteamKing: Unfortunately, I need to find an analytic solution to this.

I Like Serena: Hi! :) The problem I run into there is the fact that there are two exponents, which makes solving for the last one difficult. Here's what I did. I started off by solving for A: $A = (e_1-Bh^q)k^{-p},$ using the first equation. Then I used the second equation to get

$$B = \frac{(e_1-e_3)h^{-q}}{1-1/2^q}$$

Then using the fourth equation, I get

$$p = -\log_2\left[\left(1-1/2^q)\frac{e_4-e_1}{e_1-e_3}-\frac{1}{2^q}\right]$$

But then I have no clue about now to get q from that.

obafgkmrns: That's a very interesting quote, and it's something that has been brought up in my numerical PDE class. Of course, that was right after he asked us to solve it for homework, so take what you will from that. As an aside, that seems like a very interesting book.

Ray Vickson: I just tried that, but that linear system doesn't have a solution.

Well, in that case the original system does not have a solution, either! That fact suggests you seek a "best fit" solution, of least-squares or least-absolute deviation type.

RGV

Serena: Alright, I see where the second equation for B came from. It came from the fact that $e_2 - e_4 = Bh^q(1-u) \Rightarrow (e_2-e_4)h^{-q}/(1-u) = e_1 - e_3$.

Ray: I thought that might be the case too, but we are seeking exact, analytical solutions to this.

Ray Vickson
Homework Helper
Dearly Missed
Serena: Alright, I see where the second equation for B came from. It came from the fact that $e_2 - e_4 = Bh^q(1-u) \Rightarrow (e_2-e_4)h^{-q}/(1-u) = e_1 - e_3$.

Ray: I thought that might be the case too, but we are seeking exact, analytical solutions to this.

If e1+e4=e2+e3 there are solutions (not unique): x1 = e3-x4, x2 = e1-e3+x4, x3 = e2+e3-e1-x4, so everything can be done in terms of x4, considered as a freely-chosen parameter. These are the solutions of the first three equations for x1,x2,x3 as functions of x4. (The 4th equation also holds if e1+e4=e2+e3.)

So, if the ei-condition above holds, we can choose x4 to be anything convenient, and then get analytical solutions for A, B, p and q. If the ei-condition fails, there is NO solution, whether analytical or otherwise.

RGV

Hmm... that's not good. And yet I can't figure out any way for this problem to give good, unique solutions

Actually A and B shouldn't depend on k or h

I can change the fourth equation to make it anything of the form

$$e_4 = A(\alpha h)^p + B(\beta k)^q$$

Is there any choice of $\alpha,\beta$ that would help do you think?