# Integration problem using u substitution

## Homework Statement

$\int {sin} \frac{\pi x} {L} dx$

u substitution

## The Attempt at a Solution

If i make $u = \frac{\pi x} {L}$ and then derive u I get $\frac {\pi}{L}$ yet the final solution has $\frac {L}{\pi}$
The final solution is $\frac {L}{\pi} - cos \frac {\pi x} {L} + C$

What I am struggling to understand is why it becomes $\frac {L}{\pi}$ instead of $\frac {\pi}{L}$ ?

I would very much appreciate some assistance regarding this.

Thank you
Lazy

Related Calculus and Beyond Homework Help News on Phys.org
fresh_42
Mentor

## Homework Statement

$\int {sin} \frac{\pi x} {L} dx$

u substitution

## The Attempt at a Solution

If i make $u = \frac{\pi x} {L}$ and then derive u I get $\frac {\pi}{L}$ yet the final solution has $\frac {L}{\pi}$
The final solution is $\frac {L}{\pi} - cos \frac {\pi x} {L} + C$

What I am struggling to understand is why it becomes $\frac {L}{\pi}$ instead of $\frac {\pi}{L}$ ?

I would very much appreciate some assistance regarding this.

Thank you
Lazy
Write it out. You have $\dfrac{du}{dx}=\dfrac{\pi}{L}$. Now what do you get for $c$ in $dx=c \cdot du\,$ which has to be replaced?

Im sorry fresh_42 Im finding difficult to follow that logic. Are you asking what i would get for the constant?

fresh_42
Mentor
Im sorry fresh_42 Im finding difficult to follow that logic. Are you asking what i would get for the constant?
Perhaps I shouldn't have chosen $c$ as name for my proportional factor. I just wanted you to calculate $dx$ so that you can substitute it by $du$ in the integral and then write the integral in terms of only $u's$.

So rearranging I get $dx = \frac {du\: L}{\pi}$ then the $du$ part becomes the next step in $\sin du$ ?

Mark44
Mentor
So rearranging I get $dx = \frac {du\: L}{\pi}$ then the $du$ part becomes the next step in $\sin du$ ?
Not quite. After the substitution, your integral becomes $\int \sin(u) \frac L\pi du = \frac L \pi \int \sin(u) du$

fresh_42
Mentor
So rearranging I get $dx = \frac {du\: L}{\pi}$ then the $du$ part becomes the next step in $\sin du$ ?
Yes, with that, you substitute what you have: $\int \sin(\frac{\pi x}{L})dx = \int \sin(u) dx = \int \sin(u) \frac{du L}{\pi}= \frac{L}{\pi} \int \sin (u)\, du$

Mark44
Mentor
If i make $u = \frac{\pi x} {L}$ and then derive u I get $\frac {\pi}{L}$
Actually you're finding the differential of u, which would be $du = \frac \pi L dx$.

thank you for your assistance chaps.

fresh_42
Mentor
thank you for your assistance chaps.
Just a final remark: If you should have a definite integral, say $\int_a^b \sin(\frac{\pi x}{L})dx$ then you also have to adjust the boundaries. They actually mean $\int_{x=a}^{x=b} \sin(\frac{\pi x}{L})dx$, so we get for the $u-$notation
$$\int_{a}^{b} \sin(\frac{\pi x}{L})dx = \int_{x=a}^{x=b} \sin(\frac{\pi x}{L})dx = \frac{L}{\pi} \int_{u=\frac{\pi a}{L}}^{u=\frac{\pi b}{L}} \sin(u)du =\frac{L}{\pi} \int_{\frac{\pi a}{L}}^{\frac{\pi b}{L}} \sin(u)du$$

Mark44
Mentor
Just a final remark: If you should have a definite integral, say $\int_a^b \sin(\frac{\pi x}{L})dx$ then you also have to adjust the boundaries.
Not necessarily. After you've found the antiderivative, you can simply undo the substitution.

$\int_{x = a}^{b} \sin(\frac{\pi x}{L})dx = \int_{x = a}^{b} \sin(\frac{\pi x}{L})dx = \frac{L}{\pi} \int_{x = a}^{b} \sin(u)du =\frac{L}{\pi} \int_{x = a}^{b} \sin(u)du = -\frac{L}{\pi}\cos(u) |_{x = a}^b = -\frac{L}{\pi}\cos(\frac{\pi x}L) |_{x = a}^b$.

Undoing the substitution at the end allows you to keep the same limits of integration throughout. I've been careful to identify them as x values through each step.

fresh_42
Mentor
Not necessarily. After you've found the antiderivative, you can simply undo the substitution.

$\int_{x = a}^{b} \sin(\frac{\pi x}{L})dx = \int_{x = a}^{b} \sin(\frac{\pi x}{L})dx = \frac{L}{\pi} \int_{x = a}^{b} \sin(u)du =\frac{L}{\pi} \int_{x = a}^{b} \sin(u)du = -\frac{L}{\pi}\cos(u) |_{x = a}^b = -\frac{L}{\pi}\cos(\frac{\pi x}L) |_{x = a}^b$.

Undoing the substitution at the end allows you to keep the same limits of integration throughout. I've been careful to identify them as x values through each step.
Yes, but this assumes that you know what you do. We would simply skip the steps of conversion and reversion in between. But for students who still learn it, it's better not to skip steps. I remember integrals, where one substitution chased the other, so it's better to keep track of the boundaries. It's a potential source of mistakes.

Mark44
Mentor
Yes, but this assumes that you know what you do.
That's true of many (most?) things in life. When I taught calculus (the most recent time being a year ago), when I was doing a definite integral with a u-substitution, I would explain that you could revise the limits of integration, as you did in post #10, or you could bring them along unchanged. Writing "x = " explicitly in the lower integration limit reinforces the idea that although the dummy variable of the integral is now u, we can't evaluate the antiderivative until we undo the substitution to get back to an expression in x.