# Center of mass

## Homework Statement

We are given a bar, with length of $$d$$, and it's densitiy is given by this formula: $$\lambda=\lambda_{0}+2ax$$, where x is the distance from one side of the bar and a is a constant

## Homework Equations

$$\lambda=\lambda_{0}+2ax$$
$$\vec{r}_{CM}=\frac{\sum\vec{r}_{i}\Delta m_{i}}{m}$$

## The Attempt at a Solution

Well, I figured, if I have infinitesimal parts of the bar, I should integrate it.
So, this is what I've come up with so far:

$$M=\int^{d}_{0}(\lambda_{0}+2ax)dx=\lambda_{0}x+ax^{2}|^{d}_{0}=\lambda_{0}d+ad^{2}$$

$$X_{cm}=\frac{1}{M}\int^{d}_{0}(\lambda_{0}x+2ax^{2})dx=\frac{1}{M}(\frac{\lambda_{0}x^{2}}{2}+\frac{2ax^{3}}{3})|^{d}_{0}=\frac{3\lambda_{0}d+4ad^{2}}{6(\lambda_{0}+ad)}$$