Integration by parts with orthogonality relation

The same is true for definite integrals, but the constant disappears when we subtract two definite integrals.
  • #1
FatPhysicsBoy
62
0

Homework Statement



I want to integrate [tex]\int_{0}^{a} xsin\frac{\pi x}{a}sin\frac{\pi x}{a}dx[/tex]

Homework Equations



I have the orthogonality relation:

[tex]\int_{0}^{a} sin\frac{n\pi x}{a}sin\frac{m\pi x}{a}dx = \begin{cases} \frac{a}{2} &\mbox{if } n = m; \\
0 & \mbox{otherwise.} \end{cases} [/tex]

and the parts formula:
[tex]\int u \, dv=uv-\int v \, du[/tex]

The Attempt at a Solution



I took [itex]u = x[/itex], and [itex] dv = sin\frac{n\pi x}{a}sin\frac{m\pi x}{a}[/itex]. Following the parts formula I get a final answer of [itex]\frac{a^{2}}{2} - \frac{a^{2}}{2} = 0[/itex]. However, this is incorrect. The correct answer for the integral is [itex]\frac{a^{2}}{4}[/itex].

I know how to do this using a trigonometric identity to swap out the [itex]sin^{2}x[/itex] term for a linear term involving [itex]cos2x[/itex], but I don't quite understand why this method doesn't work. I think it has something to do with linearity but I don't fully understand why one method works and the other doesn't.
 
Last edited:
Physics news on Phys.org
  • #2
FatPhysicsBoy said:

Homework Statement



I want to integrate [tex]\int_{0}^{a} xsin\frac{\pi x}{a}sin\frac{\pi x}{a}dx[/tex]
This is the same as
$$ \int_{0}^{a} xsin^2(\frac{\pi x}{a})dx$$

An easier way to integrate this is to use a trig double angle formula.
FatPhysicsBoy said:

Homework Equations



I have the orthogonality relation:

[tex]\int_{0}^{a} sin\frac{n\pi x}{a}sin\frac{m\pi x}{a}dx = \begin{cases} \frac{a}{2} &\mbox{if } n = m; \\
0 & \mbox{otherwise.} \end{cases} [/tex]

and the parts formula:
[tex]\int u \, dv=uv-\int v \, du[/tex]

The Attempt at a Solution



I took [itex]u = x[/itex], and [itex] dv = sin\frac{n\pi x}{a}sin\frac{m\pi x}{a}[/itex]. Following the parts formula I get a final answer of [itex]\frac{a^{2}}{2} - \frac{a^{2}}{2} = 0[/itex]. However, this is incorrect. The correct answer for the integral is [itex]\frac{a^{2}}{4}[/itex].

I know how to do this using a trigonometric identity to swap out the [itex]sin^{2}x[/itex] term for a linear term involving [itex]cos2x[/itex], but I don't quite understand why this method doesn't work. I think it has something to do with linearity but I don't fully understand why one method works and the other doesn't.
 
  • #3
FatPhysicsBoy said:

Homework Statement



I want to integrate [tex]\int_{0}^{a} xsin\frac{\pi x}{a}sin\frac{\pi x}{a}dx[/tex]

Homework Equations



I have the orthogonality relation:

[tex]\int_{0}^{a} sin\frac{n\pi x}{a}sin\frac{m\pi x}{a}dx = \left \{ \begin{matrix}
\frac{a}{2} \text{, if \textit{n = m};}\\
0 \text{, otherwise.}
\end{matrix}\right.[/tex]

If you have a "\left", you need a matching "\right". "\right." is necessary if you don't want a closing symbol. But this sort of thing is best done using "\begin{cases}":
Code:
I(n,m)  = \begin{cases} \frac{a}{2}, & \mbox{if $n = m$}, \\[1em]
0 & \mbox{else} \end{cases}
gives
[tex]
I(n,m) = \begin{cases} \frac{a}{2}, & \mbox{if $n = m$} \\[1em]
0 & \mbox{else} \end{cases} [/tex]

and the parts formula:
[tex]\int u \, dv=uv-\int v \, du[/tex]

The Attempt at a Solution



I took [itex]u = x[/itex], and [itex] dv = sin\frac{n\pi x}{a}sin\frac{m\pi x}{a}[/itex]. Following the parts formula I get a final answer of [itex]\frac{a^{2}}{2} - \frac{a^{2}}{2} = 0[/itex]. However, this is incorrect. The correct answer for the integral is [itex]\frac{a^{2}}{4}[/itex].

I know how to do this using a trigonometric identity to swap out the [itex]sin^{2}x[/itex] term for a linear term involving [itex]cos2x[/itex], but I don't quite understand why this method doesn't work. I think it has something to do with linearity but I don't fully understand why one method works and the other doesn't.

If [itex]dv = \sin(\pi x/a)\sin(\pi x/a)[/itex] then
[tex]
v = \int \sin(\pi x/a)\sin(\pi x/a)\,dx.
[/tex] The integral is indefinite, not a definite integral from [itex]0[/itex] to [itex]a[/itex], so you can't use the orthogonality relation to evaluate it.
 
  • #4
pasmith said:
If you have a "\left", you need a matching "\right". "\right." is necessary if you don't want a closing symbol. But this sort of thing is best done using "\begin{cases}":
Code:
I(n,m)  = \begin{cases} \frac{a}{2}, & \mbox{if $n = m$}, \\[1em]
0 & \mbox{else} \end{cases}
gives
[tex]
I(n,m) = \begin{cases} \frac{a}{2}, & \mbox{if $n = m$} \\[1em]
0 & \mbox{else} \end{cases} [/tex]



If [itex]dv = \sin(\pi x/a)\sin(\pi x/a)[/itex] then
[tex]
v = \int \sin(\pi x/a)\sin(\pi x/a)\,dx.
[/tex] The integral is indefinite, not a definite integral from [itex]0[/itex] to [itex]a[/itex], so you can't use the orthogonality relation to evaluate it.

Thanks for that, I managed to get it sorted in the end, I hit 'Submit Reply' by accident instead of 'Preview Post'.

I suppose that does make sense when I consider all the other instances where I've used product rule. We never evaluate the v integrand definitely. If the integral is always indefinite then why don't we have constants of integration floating about when we do integration by parts?
 
  • #5
There isn't a need to use integration by parts. You can easily solve this by using the properties of definite integral.

Let:
$$I=\int_0^a x\sin^2\left( \frac{\pi x}{a}\right)\,dx$$
The above is same as:
$$I=\int_0^a (a-x)\sin^2\left( \frac{\pi x}{a}\right)\,dx$$
Add the two expressions for ##I## to get:
$$2I=\int_0^a a\sin^2\left( \frac{\pi x}{a}\right)\,dx$$
Use the orthogonality relation you posted to get the required answer.
 
  • #6
FatPhysicsBoy said:
I suppose that does make sense when I consider all the other instances where I've used product rule. We never evaluate the v integrand definitely. If the integral is always indefinite then why don't we have constants of integration floating about when we do integration by parts?

We don't need them. If [itex]C[/itex] is a constant then [itex](v(x) +C)' = v'(x)[/itex] and
[tex]
\int u(x)v'(x)\,dx = u(x)(v(x) + C) - \int u'(x)(v(x) + C)\,dx \\
= u(x)v(x) + Cu(x) - \int u'(x)v(x)\,dx - \int Cu'(x)\,dx \\
= u(x)v(x) - \int u'(x)v(x)\,dx + C\left( u(x) - \int u'(x)\,dx\right) \\
= u(x)v(x) - \int u'(x)v(x)\,dx + C\left( u(x) - (u(x) + D)\right) \\
= u(x)v(x) - \int u'(x)v(x)\,dx - CD
[/tex] and we can combine [itex]-CD[/itex] with the constant we get from integrating [itex]u'v[/itex].
 
  • Like
Likes 1 person
  • #7
FatPhysicsBoy said:

Homework Equations



I have the orthogonality relation:

[tex]\int_{0}^{a} sin\frac{n\pi x}{a}sin\frac{m\pi x}{a}dx = \begin{cases} \frac{a}{2} &\mbox{if } n = m; \\
0 & \mbox{otherwise.} \end{cases} [/tex]

and the parts formula:
[tex]\int u \, dv=uv-\int v \, du[/tex]

You're answer is wrong because [tex]\int_{0}^{a} sin\frac{n\pi x}{a}sin\frac{m\pi x}{a}dx = \begin{cases} \frac{x}{2} &\mbox{if } n = m; \\
0 & \mbox{otherwise.} \end{cases} [/tex]

The [itex]\frac{a}{2}[/itex] is after evaluation of the integral from 0 to a. So your [itex]\int[/itex]vdu is actually [itex]\int[/itex][itex]\frac{x}{2}[/itex]dx.
 
  • Like
Likes 1 person

Related to Integration by parts with orthogonality relation

1. What is the purpose of using integration by parts with orthogonality relation?

The purpose of using integration by parts with orthogonality relation is to simplify the process of integration for certain types of integrals. This method involves using the orthogonality relation, which states that the dot product of two orthogonal functions is equal to zero, to solve the integral.

2. How does integration by parts with orthogonality relation work?

Integration by parts with orthogonality relation works by breaking down a complex integral into simpler integrals using the formula ∫u(x)v'(x)dx = u(x)v(x) - ∫v(x)u'(x)dx. This method involves choosing u(x) and v(x) carefully so that the integral becomes easier to solve using the orthogonality relation.

3. What are some examples of using integration by parts with orthogonality relation?

Some examples of using integration by parts with orthogonality relation include solving integrals involving trigonometric functions, such as ∫sin(x)cos(x)dx and ∫sin^2(x)dx. It can also be used to solve integrals involving exponential functions, such as ∫x^2e^x dx.

4. Can integration by parts with orthogonality relation be used for all types of integrals?

No, integration by parts with orthogonality relation can only be used for integrals where the functions involved are orthogonal. This means that the dot product of the two functions must equal zero. For other types of integrals, different integration techniques must be used.

5. What are the advantages of using integration by parts with orthogonality relation?

The main advantage of using integration by parts with orthogonality relation is that it simplifies the process of integration for certain types of integrals. It also allows for the direct calculation of integrals that would otherwise be difficult to solve using other methods. Additionally, this method can be used to solve a wide range of integrals involving orthogonal functions.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
424
  • Calculus and Beyond Homework Help
Replies
1
Views
344
  • Calculus and Beyond Homework Help
Replies
5
Views
537
  • Calculus and Beyond Homework Help
Replies
16
Views
670
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
376
  • Calculus and Beyond Homework Help
Replies
3
Views
662
  • Calculus and Beyond Homework Help
Replies
1
Views
617
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
472
Back
Top