Can't seem to figure out why I get '-17172.5' as an answer for 'dq' when the correct answer should be '5283.212' Can anyone spot an easy error I may have missed I've been staring at it for hours cheers
this is an impossible task for us.
here you have a wrong equation that is eaqual to -17172.5.
try to alter it so it becomes 5283.212. it's just impossible to do that.
maybe try to tell us what exactly you are calculating when u get the value of dq? or how did you get that equation.
if i calculate it myself i also get-17172.5
if this is what your equation is then the solution is really 12323.08581 and the solution key is wrong.
i have a program on my calculator that solves any equation and it also resulted in that
unless you gave us wrong values for the variables :s
could you use that program and calculate the equation again but instead of using natural log use just common log (log(base10)) and see what answer you get?
double a = .05;
double y = .05;
double dq;
double f = 3.0;
double k = .1;
dq = 15072 *
( 1.0 - ( a + y / a ) / ( 1.0 + ( a + y * f ) / k * std::log( a + y /a ) ) );
std::cout << dq << "\n";