I don't know how to solve the following linear equation with jQuery.
12.5x = 20 + x + (20 + x)/10 (Note that 12.5, 20, and 10 are numbers provided by user)
Is there a way in jQuery to get x? Thank you very much
I don't know how to solve the following linear equation with jQuery.
12.5x = 20 + x + (20 + x)/10 (Note that 12.5, 20, and 10 are numbers provided by user)
Is there a way in jQuery to get x? Thank you very much
Assume you equation is of format:
ax = b + x + (c + x) / d;
Hence the solution is:
var x = (b * d + c) / (a * d - d - 1);
if b === c
then, solution is:
var x = (b * d + b) / (a * d - d - 1);