Solving a definite integral without integrating

In summary: I don't understand the point of this way of doing it. I don't see how this is faster than just multiplying it all out. (I'm not being sarcastic.)I mean, I can do it this way and I did get the correct answer, but I don't see how it is better.It's not faster. It's not intended to be faster. It's intended to clarify what's going on.
  • #1
Dustinsfl
2,281
5
Orthonormal basis [tex]\big(\frac{1}{\sqrt{2}}, cos(2x)\big)[/tex]

[tex]\pi \int_{-\pi}^{\pi} sin^4(x)dx=\frac{3\pi}{4}[/tex]

Solve the integral without integrating.

[tex]sin^4(x)=\big[\frac{1-cos(2x)}{2}\big]^2=\frac{1}{4} - \frac{2cos(2x)}{4} + \frac{cos^2(2x)}{4}[/tex]

I know I could rewrite [tex]cos^2(2x)[/tex] but then I have a 4x but for the test basis cos 4x is not included.

I couldn't answer it so can someone post the step by step answer so I can see why I couldn't do it?
 
Last edited:
Physics news on Phys.org
  • #2
Dustinsfl said:
Orthonormal basis [tex]\big(\frac{1}{\sqrt{2}}, cos(2x)\big)[/tex]

[tex]\pi \int_{-\pi}^{\pi} sin^4(x)dx=\frac{3\pi}{4}[/tex]

Solve the integral without integrating.

[tex]sin^4(x)=\big[\frac{1-cos(2x)}{2}\big]^2=\frac{1}{4} - \frac{2cos(2x)}{4} + \frac{cos^2(2x)}{4}[/tex]

I know I could rewrite [tex]cos^2(2x)[/tex] but then I have a 4x but for the test basis cos 4x is not including.

I couldn't answer it so can someone post the step by step answer so I can see why I couldn't do it?
Edit: Changed the values of the inner products.
You need to think of this integral as an inner product. Since your basis is orthonormal, <1/sqrt(2), 1/sqrt(2)> = 1 and <cos(2x), cos(2x)> = 1, while <1/sqrt(2), cos(2x)> = 0.

Rewrite the integrand as sin^2(x) sin^2(x) = ((1/2)(1 - cos(2x))^2, and expand this, then look at the individual products as described in the previous paragraph.
 
Last edited:
  • #3
Dustinsfl said:
Orthonormal basis [tex]\big(\frac{1}{\sqrt{2}}, cos(2x)\big)[/tex]

What does that line mean?
 
  • #4
Mark44 said:
Since your basis is orthonormal, <1/sqrt(2), 1/sqrt(2)> = 0 and <cos(2x), cos(2x)> = 0, while <1/sqrt(2), cos(2x)> = 1.

I think you've made a typo - shouldn't your 0s and 1s be the other way round?
 
  • #5
Good catch! Apparently my fingers got disconnected from my brain. I went back and edited what I wrote.
 
  • #6
Gregg said:
What does that line mean?

An orthonormal basis is a set of mutually orthogonal unit vectors that span the vector space.
 
  • #7
And the context here is apparently an inner product space with {1/sqrt(2), cos(2x)} as an orthonormal basis and the inner product defined as follows:
[tex]<f, g> = \int_{-\pi}^{\pi} fg~dx[/tex]

Dustin, it would have been helpful to include this information as part of the complete problem description or relevant equations.
 
  • #8
[tex]\pi*\big[\frac{1}{2}-\frac{cos(2x)}{2}\big]^2[/tex]

[tex]\pi*\big[\frac{1}{\sqrt{2}} * \frac{1}{\sqrt{2}}-\frac{cos(2x)}{2}\big]^2[/tex]

[tex]\pi*\big[\frac{1}{\sqrt{2}}-\frac{1}{2}\big]^2=\pi*[\frac{2-\sqrt{2}}{2\sqrt{2}}]^2[/tex]

[tex]\pi*\big[\frac{3-\sqrt{2}}{4}\big]\neq\frac{3\pi}{4}[/tex]

Why didn't this work?
 
Last edited:
  • #9
Mark44 said:
And the context here is apparently an inner product space with {1/sqrt(2), cos(2x)} as an orthonormal basis and the inner product defined as follows:
[tex]<f, g> = \int_{-\pi}^{\pi} fg~dx[/tex]

Dustin, it would have been helpful to include this information as part of the complete problem description or relevant equations.

We didn't need to prove that [tex]\big(\frac{1}{\sqrt{2}},cos(2x)}\big)[/tex] was an orthonormal basis.

This is a standard orthonormal basis [tex]\big(\frac{1}{\sqrt{2}},cos(x),cos(2x),...,cos(nx),...sin(x),sin(2x),...,sin(nx)\big)[/tex]
 
  • #10
Dustinsfl said:
[tex]\pi*\big[\frac{1}{2}+\frac{cos(2x)}{2}\big]^2[/tex]

[tex]\pi*\big[\frac{1}{\sqrt{2}} * \frac{1}{\sqrt{2}}+\frac{cos(2x)}{2}\big]^2[/tex]

[tex]\pi*\big[\frac{1}{\sqrt{2}}+\frac{1}{2}\big]^2=\pi*[\frac{2+\sqrt{2}}{2\sqrt{2}}]^2[/tex]

[tex]\pi*\big[\frac{3+\sqrt{2}}{4}\big]\neq\frac{3\pi}{4}[/tex]

Why didn't this work?

For starters, sin2(x) [itex]\neq[/itex] (1/2)(1 + cos(2x))

Second, is there any connection between any of the lines above and the one below it? Is there any connection between what you have here and the problem you're trying to solve?

Third, are you trying to convince us that cos(2x) = 1? (see third line) That's not true.

Fourth, is there any connection between the work above and the integral in your first post?

Fifth, is there any connection between your orthogonal basis and what you have here?
 
Last edited:
  • #11
Typo. I know sin^2 is the negative.
 
  • #12
Dustinsfl said:
We didn't need to prove that [tex]\big(\frac{1}{\sqrt{2}},cos(2x)}\big)[/tex] was an orthonormal basis.
Nor am I asking you to prove it, just follow SOP for the forum by including information that might be relevant in the problem, such as the fact that the integral represents the inner product.
Dustinsfl said:
This is a standard orthonormal basis [tex]\big(\frac{1}{\sqrt{2}},cos(x),cos(2x),...,cos(nx),...sin(x),sin(2x),...,sin(nx)\big)[/tex]
 
  • #13
I am still at the problem that after taking the coefficients and doing the arithmetic the answer wasn't correct.
 
  • #14
In post 8 you asked why what you did didn't work. I gave you 5 reasons. If you have any specific questions about any of them, fire away.
 
  • #15
I changed the (+) to (-). I took the coefficients, subtracted, and then squared which should be the correct answer.

I have done this many of times and I obtained the correct answer but I can't this one to work.
 
  • #16
Did you not see these?

mark44 said:
Second, is there any connection between any of the lines above and the one below it? Is there any connection between what you have here and the problem you're trying to solve?

Third, are you trying to convince us that cos(2x) = 1? (see third line) That's not true.

Fourth, is there any connection between the work above and the integral in your first post?

Fifth, is there any connection between your orthogonal basis and what you have here?


You seem to be under the (false) impression that you are supposed to simplify the following expression. That is NOT what this problem is about, and even so, you have a mistake in that work (my third point above).
[tex]\pi*\big[\frac{1}{2} - \frac{cos(2x)}{2}\big]^2[/tex]
 
  • #17
How should it be worked it if it shouldn't be simplified?
 
  • #18
What is the problem you are trying to solve? If you don't remember, go back to your first post.
 
  • #19
The integral of sin^4
 
  • #20
Dustinsfl said:
The integral of sin^4

You've already correctly said that [itex]\sin^4(x)=\frac{1}{4}-\frac{\cos(2x)}{2}+\frac{\cos^2(2x)}{4}[/itex], so now you have

[tex]\begin{aligned}\int_{-\pi}^{\pi}\sin^4(x)dx &=\int_{-\pi}^{\pi}\left(\frac{1}{4}-\frac{\cos(2x)}{2}+\frac{\cos^2(2x)}{4}\right)dx \\ &= \int_{-\pi}^{\pi}\frac{1}{4}dx-\int_{-\pi}^{\pi}\frac{\cos(2x)}{2}dx+\int_{-\pi}^{\pi}\frac{\cos^2(2x)}{4}dx\end{aligned}[/tex]

Now, compare these integrals to the inner products that you know. For example, the first one is [itex]1/2[/itex] times the inner product of [itex]\frac{1}{\sqrt{2}}[/itex] with itself; which gives you [itex]\frac{\pi}{2}[/itex]...how about the second one?...And the third?
 
  • #21
And more specifically,
[tex]\int_{-\pi}^{\pi}sin^4(x)~dx[/tex]

Replace sin^4(x) by an expression that uses the functions in your orthonormal basis, and then integrate that expression. Keep in mind that your integral is an inner product such that [itex]\int fg[/itex] = 0 if f and g are different, and 1 if f = g.
 
  • #22
On a side note, the basis you gave is orthogonal without a weight function (or with a weight function of one), but only orthonormal with a weight function of [itex]1/\pi[/itex].
 
  • #23
Mark44 said:
And more specifically,
[tex]\int_{-\pi}^{\pi}sin^4(x)~dx[/tex]

Replace sin^4(x) by an expression that uses the functions in your orthonormal basis, and then integrate that expression. Keep in mind that your integral is an inner product such that [itex]\int fg[/itex] = 0 if f and g are different, and 1 if f = g.

I am not allowed to integrate this expression.

For example, here is how I did a different one.
Basis:[tex]\big(\frac{1}{\sqrt{2}},cos(x),cos(2x),cos(3x),cos(4x)\big)[/tex]

[tex]\int_{-\pi}^{\pi}sin^4(x)cos(2x)dx[/tex]

[tex]sin^4(x)=\frac{3}{8}-\frac{cos(2x)}{2}+\frac{cos(4x)}{8}[/tex]

[tex]\frac{3}{4\sqrt{2}}*\frac{1}{2}-\frac{cos(2x)}{2}+\frac{cos(4x)}{8}[/tex]

[tex]\left[ \begin{array}{c c c c c}
\frac{3}{4\sqrt{2}} & 0 & \frac{-1}{2} & 0 & \frac{1}{8} \\
0 & 0 & 1 & 0 & 0 \end{array} \right]
[/tex]

[tex]\pi*\big[\frac{3}{4\sqrt{2}}*0+0*0+\frac{-1}{2}*1+0*0+\frac{1}{8}*0\big][/tex]

[tex]=\frac{-\pi}{2}[/tex]
 
  • #24
Dustinsfl said:
I am not allowed to integrate this expression.

For example, here is how I did a different one.
Basis:[tex]\big(\frac{1}{\sqrt{2}},cos(x),cos(2x),cos(3x),cos(4x)\big)[/tex]

[tex]\int_{-\pi}^{\pi}sin^4(x)cos(2x)dx[/tex]

[tex]sin^4(x)=\frac{3}{8}-\frac{cos(2x)}{2}+\frac{cos(4x)}{8}[/tex]

[tex]\frac{3}{4\sqrt{2}}*\frac{1}{2}-\frac{cos(2x)}{2}+\frac{cos(4x)}{8}[/tex]

[tex]\left[ \begin{array}{c c c c c}
\frac{3}{4\sqrt{2}} & 0 & \frac{-1}{2} & 0 & \frac{1}{8} \\
0 & 0 & 1 & 0 & 0 \end{array} \right]
[/tex]

[tex]\pi*\big[\frac{3}{4\sqrt{2}}*0+0*0+\frac{-1}{2}*1+0*0+\frac{1}{8}*0\big][/tex]

[tex]=\frac{-\pi}{2}[/tex]

I understand what you are doing here, but the way you've written it is nonsensical. You've got a grand total of two equal signs in your entire workings; you've got a table without any headings, that looks like a matrix; you've got expressions that are adding integration results to integrands and so on.

A correct way of writing this would be the following:

[tex]\begin{aligned} \int_{-\pi}^{\pi}\sin^4(x)\cos(2x)dx &= \int_{-\pi}^{\pi}\left(\frac{3}{8}-\frac{cos(2x)}{2}+\frac{cos(4x)}{8}\right)\cos(2x)dx \\ &= \frac{3}{4\sqrt{2}}\int_{-\pi}^{\pi}\frac{1}{\sqrt{2}}\cos(2x)dx-\frac{1}{2}\int_{-\pi}^{\pi}\cos(2x)\cos(2x)dx+\frac{1}{8}\int_{-\pi}^{\pi}\cos(4x)\cos(2x)dx \\ &= \frac{3}{4\sqrt{2}}\langle \frac{1}{\sqrt{2}}|\cos(2x)\rangle-\frac{1}{2}\langle \cos(2x)|\cos(2x)\rangle+\frac{1}{8}\langle \cos(4x)|\cos(2x)\rangle \\ &= \frac{3}{4\sqrt{2}}(0)-\frac{1}{2}(\pi)+\frac{1}{8}(0) \\ &= -\frac{\pi}{2}\end{aligned}[/tex]

You can't just write a jumbled mess of expressions and expect others (most importantly those marking your assignment) to know what you are doing. Each step you write down must be mathematically correct and must follow from the previous step in a logical manner.
 
  • #25
Why isn't the first the integral working out right though? sin^4
 
  • #26
Dustinsfl said:
Why isn't the first the integral working out right though? sin^4

Look at post #20 and answer the two simple questions I posed to you.
 
  • #27
I don't know what to do with the cosine squared term.
 
  • #28
[itex]\cos^2(2x)=\cos(2x)\cos(2x)[/itex]...
 
  • #29
I still can't get it.
 
  • #30
Compare [itex]\int_{-\pi}^{\pi}\cos(2x)\cos(2x)dx[/itex] to the definition of the inner product...which inner product does that integral represent?
 
  • #31
gabbagabbahey said:
You've already correctly said that [itex]\sin^4(x)=\frac{1}{4}-\frac{\cos(2x)}{2}+\frac{\cos^2(2x)}{4}[/itex], so now you have

[tex]\begin{aligned}\int_{-\pi}^{\pi}\sin^4(x)dx &=\int_{-\pi}^{\pi}\left(\frac{1}{4}-\frac{\cos(2x)}{2}+\frac{\cos^2(2x)}{4}\right)dx \\ &= \int_{-\pi}^{\pi}\frac{1}{4}dx-\int_{-\pi}^{\pi}\frac{\cos(2x)}{2}dx+\int_{-\pi}^{\pi}\frac{\cos^2(2x)}{4}dx\end{aligned}[/tex]

Now, compare these integrals to the inner products that you know. For example, the first one is [itex]1/2[/itex] times the inner product of [itex]\frac{1}{\sqrt{2}}[/itex] with itself; which gives you [itex]\frac{\pi}{2}[/itex]...how about the second one?...And the third?

How is the first integral [tex]\frac{1}{2}[/tex]?
 
  • #32
Dustinsfl said:
How is the first integral [tex]\frac{1}{2}[/tex]?

It isn't.

[tex]\int_{-\pi}^{\pi}\frac{1}{4}dx=\frac{1}{2}\int_{-\pi}^{\pi}\left(\frac{1}{\sqrt{2}}\right)\left(\frac{1}{\sqrt{2}}\right)dx[/tex]

It's 1/2 times the inner product of [itex]1/\sqrt{2}[/itex] with itself.
 
  • #33
[tex]\frac{1}{2}\int\frac{1}{\sqrt{2}}\frac{1}{\sqrt{2}}-\frac{1}{\sqrt{2}}\int\frac{1}{\sqrt{2}}cos(2x)+\frac{1}{4}\int cos(2x)*cos(2x)=\pi*\big[\frac{1}{2}+0+\frac{1}{4}\big]=\frac{3\pi}{4}[/tex]

I have no idea why the Latex display is all messed up but it is typed in correct.
 
  • #34
You are missing the "dx"s in your integrals, and your integration limits, but other than that it looks fine.
 
  • #35
Dustin, I hope you will take what gabbagabbahey and I have been saying to heart.

gabbagabbahey said:
I understand what you are doing here, but the way you've written it is nonsensical. You've got a grand total of two equal signs in your entire workings; you've got a table without any headings, that looks like a matrix; you've got expressions that are adding integration results to integrands and so on.
I commented on the lack of equal signs much earlier in this thread, and several other points that you didn't acknowledge.

mark44 said:
For starters, sin2(x) [itex]\neq[/itex] (1/2)(1 + cos(2x)) [Note: you did fix this one.]

Second, is there any connection between any of the lines above and the one below it? Is there any connection between what you have here and the problem you're trying to solve?

Third, are you trying to convince us that cos(2x) = 1? (see third line) That's not true.

Fourth, is there any connection between the work above and the integral in your first post?

Fifth, is there any connection between your orthogonal basis and what you have here?

What we're trying to get you to do is to write statements (e.g., equations) that flow logically from what you're given to what you want to show. It took a long while to get you to realize the connection between your basis and the integral - i.e., that you were working with something akin to the dot product. Just as the dot product of orthogonal vectors is zero, the inner product of orthogonal functions is also zero.

If it were just me making comments about things, you might put it down to me picking on you, but gabbagabbahey made similar comments about your work. It's in your best interest to keep these comments in mind.
 

FAQ: Solving a definite integral without integrating

What is the purpose of solving a definite integral without integrating?

The purpose of solving a definite integral without integrating is to find the numerical value of the integral without having to go through the process of integration. This can save time and effort, especially for complex integrals.

How do you solve a definite integral without integrating?

There are several methods for solving a definite integral without integrating, including using numerical integration techniques like the trapezoidal rule or Simpson's rule, using properties of integrals such as linearity and symmetry, or using substitution or other algebraic manipulations to simplify the integral.

Can all definite integrals be solved without integrating?

No, not all definite integrals can be solved without integrating. Some integrals may be too complex to solve using numerical or algebraic techniques, and in these cases, integration may be necessary to find the solution.

What are some advantages of solving a definite integral without integrating?

Solving a definite integral without integrating can save time and effort, and it can also provide a more accurate solution since numerical integration techniques can often provide more precise results than hand integration. Additionally, using algebraic techniques can help to understand the properties and behavior of the integral function.

Are there any limitations to solving a definite integral without integrating?

Yes, there are some limitations to solving a definite integral without integrating. Some integrals may be too complex to be solved using numerical or algebraic techniques, and in these cases, integration may be the only way to find the solution. Additionally, using numerical integration techniques may introduce some error in the final result.

Similar threads

Replies
15
Views
1K
Replies
9
Views
846
Replies
9
Views
861
Replies
9
Views
809
Replies
40
Views
1K
Back
Top