How Do I Format This Excel Equation Correctly?

  • Thread starter Thread starter ricky12tt
  • Start date Start date
  • Tags Tags
    Excel Format
AI Thread Summary
The discussion revolves around a programming assignment requiring the calculation of a specific ratio using Excel. The ratio is defined by the equation T_b/T_a = ([R^4 - (R - λR)^4]) / ([4λR^2 * (R - λR/2)^2]). The original poster encountered issues with their Excel formula, consistently receiving zero as a result. Suggestions included breaking the formula into smaller parts for easier troubleshooting and using simpler operators for clarity. There was also a debate about the correct interpretation of the formula, specifically regarding whether to subtract or multiply certain components. Ultimately, the poster found success by simplifying their approach and using basic functions, confirming that writing equations out on paper beforehand can help prevent errors in Excel. The conversation highlighted the importance of algebraic simplification and the potential advantages of using alternative software like Matlab or Octave for such calculations.
ricky12tt
Messages
5
Reaction score
0
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
 
Technology news on Phys.org
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.
 
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))
 
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.




CaptainPanic said:
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))
 
I would try that. They probably do cancel out but the arithmetic was taking me too long.


Integral said:
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.
 
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.
 
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).
 
Hey Thanks. I used the simpler functions and they worked.
 
I got it working.
Thanks for all the help

CaptainPanic said:
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).
 
Back
Top