# Excel, proper equation format.

1. Oct 20, 2008

### ricky12tt

Ok, so the teacher gave us an assignment to write a program that calculates the ratio below, tabulate it and plot it.. for given values of R and λ.

T_b/T_a =([R^4-(R-λR)^4])/([4λR^2 (R-λR/2)^2])

I figured that I would use Excel to do this.

I think the above equation converts to the function below in excel but I keep getting zero for all values I try.

C2=R
And A4=λ

=QUOTIENT(((POWER(C2,4))-(POWER((C2)-(PRODUCT(C2,A4)),4))),(PRODUCT((POWER(((C2)-(QUOTIENT((PRODUCT(A4,C2)),2))),2)),4,A4,(POWER(C2,2)))))

Any help would be appreciated.
Thanks

2. Oct 21, 2008

### Integral

Staff Emeritus
I would break it up into manageable chunks putting them in a series of cells. Then combining the pieces into the final relationship.

Also you can use simple operators like ^ for exponentiation, * for multiplication and / for divide. That may be easier to read and troubleshoot then the functions you are using.

Is that ratio correct? Looks to me like R cancels out.

3. Oct 21, 2008

### CaptainPanic

Well... my excel does not understand "QUOTIENT" (I have an English speaking Excel 2003).
And also, there seems a mistake in your formula: ([R^4-(R-λR)^4])/([4λR^2 (R-λR/2)^2]) - the underlined part, should I subtract one part from the other, or multiply? There's a symbol missing. I chose for subtracting.

Then:
T_b/T_a =([R^4-(R-λR)^4])/([4λR^2 - (R-λR/2)^2])
T_b = ([R^4-(R-λR)^4])
T_a = ([4λR^2 - (R-λR/2)^2])

And in Excel language:
(For T_b)
=((C2^4)-(C2-($A$4*C2)^4))
(For T_a)
=((4*$A$4*C2^2)-(C2-($A$4*C2/2)^2))

4. Oct 21, 2008

### ricky12tt

I'm sorry.. it supposed to be multiplied
([R^4-(R-λR)^4])/([(4λR^2)*(R-λR/2)^2])

I'll try your suggestion. I have Excel 2007 though.
I think Initially your method is what I had tried but I'll give it a go again.

5. Oct 21, 2008

### ricky12tt

I would try that. They probably do cancel out but the arithmetic was taking me too long.

6. Oct 21, 2008

### Integral

Staff Emeritus
If you are unable to do the simple algebra required to cancel out the R, how do you hope to get the formula entered correctly into Excel?

Do the Algebra, it will simplify the spread sheet.

Also note that double posting is strictly against fourm policy.

7. Oct 21, 2008

### CaptainPanic

I didn't bother to do any algebra... but indeed, if it is important, writing out an equation on paper before entering it into the computer generally makes life easier. Equations in a computer program can become a nightmare with all the brackets and pluses/minuses.

I'd be surprised if Excel 2003 "language" does not work in 2007. If that would be true, it would be a very strong argument for Matlab or Octave (Octave is the GPL version of Matlab, with a lot less functionality, but more than adequate to plot this little equation).

8. Oct 21, 2008

### ricky12tt

Hey Thanks. I used the simpler functions and they worked.

9. Oct 21, 2008

### ricky12tt

I got it working.
Thanks for all the help

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?