Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having an issue solving this. I wrote this equation to find the with of a bar for a bar chart that is comparative. \begin{equation} D-P*(N+1) = ((N-1)*M)*B*0.75+N*B \end{equation}

share|cite|improve this question
D and P are numbers, integers. D is the size of the drawable area, P is the padding between bars. – Jaybit Jul 3 '12 at 18:38
some one else edited it... should be fixed – Jaybit Jul 3 '12 at 18:40
@RossMillikan Yeah, my bad sorry for confusion. – data Jul 3 '12 at 18:41
up vote 1 down vote accepted

No guarantee that the result will be an integer, but just distribute the $B$ out of the terms on the right and divide.

$\begin{equation} D-P*(N+1) = ((N-1)*M)*B*0.75+N*B \end{equation}$

$\begin{equation} D-P*(N+1) =( ((N-1)*M)*0.75+N)*B \end{equation}$

$\begin{equation} (D-P*(N+1))/( ((N-1)*M)*0.75+N)=B \end{equation}$

share|cite|improve this answer
Thanks, Looks good. Forgot about taking B out of the terms on the right. – Jaybit Jul 3 '12 at 18:44
Is "*" a common operator for multiplication? I thought it was "\times" or "\cdot"? – Gigili Jul 3 '12 at 18:56
@Gigili: Some people use it. It is easier in handwriting to distinguish from the variable $x$. Many programming languages use it. I followed the OP which let me copy/paste. – Ross Millikan Jul 3 '12 at 18:59
@RossMillikan: Ah OK, good to know. Thanks. Actually I was aware of the programming usage of it but I recalled someone recommended to avoid using it in LaTeX. – Gigili Jul 3 '12 at 19:10
My first math question on math.stackexchange... I am a programmer so I always use stackOverflow. In programming * is a common for multiplication. Here is the equation in objective-c: float barWidth = (drawableArea-SECTION_SPACING*([barArray count]+1)) / ((([barArray count]-1)*[barSetArray count])*0.75+[barArray count]); – Jaybit Jul 3 '12 at 21:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.