- #1

GarethB

- 15

- 0

I really don't know where to begin. Is the choice of the value of t of where to split it arbitrary?

How would you handle the change of variables?

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter GarethB
- Start date

In summary, the conversation was about how to evaluate a definite integral using Simpson's rule and handle singularities by splitting the integral into two parts and using a change of variable. The suggested change of variable was t=cos(x) and it was shown how to handle the singularity at t=1 by converting it to a singularity at x=0 and using the canceling factor of sin(x). The conversation also included a discussion on using LaTeX to write the integral expression.

- #1

GarethB

- 15

- 0

I really don't know where to begin. Is the choice of the value of t of where to split it arbitrary?

How would you handle the change of variables?

Physics news on Phys.org

- #2

gulfcoastfella

Gold Member

- 99

- 1

- #3

sunjin09

- 312

- 0

- #4

GarethB

- 15

- 0

the integral I am trying to compute is;

[0]\int[/1][t]^{-2}[/3][(1-t)]^{-1}[/3]dt

I have never used latex before so bare with me if this is a disaster

- #5

GarethB

- 15

- 0

ok sorry that clearly didn't work!

- #6

Mark44

Mentor

- 37,772

- 10,145

Other people responding to your post are confused about what the integrand is. If you write it inline, you NEED parentheses around your fractions.GarethB said:I am required to write a program that uses Simpson's rule to evaluate ∫t**-2/3(1-t)**-1/3 dt from limits t=0 to t=1.

As best as I can tell, this is your integrand:

t^(-2/3) * (1 - t)^(-1/3)

In a little nicer form (and not using LaTeX), this would be

t

I'm using the HTML tags for exponents here. They are available when you click

An even nicer form for your integral uses LaTeX.

$$\int_0^1 t^{-2/3} ~ (1 - t)^{-1/3}dt$$

If you click the integral expression, you can see the LaTeX script I used to get this integral.

- #7

GarethB

- 15

- 0

- #8

GarethB

- 15

- 0

Every variable change I have tried just swaps where the singularities are.

- #9

GarethB

- 15

- 0

I have tried x=1/t as well as x=sin(t). The singularities remain.

- #10

sunjin09

- 312

- 0

GarethB said:ok sorry that clearly didn't work!

I assume you are referring to my suggested change of variable t=cosτ. Well as I tested it worked for the t=1 singularity and not for the t=0 one. What you can do is split the integral into (0,1/2) and (1/2,1), my trick works for the latter. Similar trick can be applied to the first interval, although I admit there must be a nicer way that handles both ends at the same time.

- #11

GarethB

- 15

- 0

I tried your suggestion of using t=cos(x). Surely then the upper limit will be zero, (since cos(0)=1) in which case the term (1-cos(x))^-1/3 will surely be undefined at the upper limit? Or am I missing something? Would you mind showing me how you solved it for the upper bound?

- #12

gulfcoastfella

Gold Member

- 99

- 1

Ignore this post, I was in the wrong thread...

- #13

sunjin09

- 312

- 0

GarethB said:

I tried your suggestion of using t=cos(x). Surely then the upper limit will be zero, (since cos(0)=1) in which case the term (1-cos(x))^-1/3 will surely be undefined at the upper limit? Or am I missing something? Would you mind showing me how you solved it for the upper bound?

The (1-cos(x))^-1/3 blows up as x→0, but dt=-sin(x)dx, the sin(x) factor CANCELS the singularity, i.e., (1-cos(x))^-1/3*sin(x) is well behaved as x→0, the resultant integral can be evaluated in [itex]x\in(0,\pi/3)[/itex], corresponding to the t integral over (1/2,1), more specifically

[tex]

\int_{1/2}^1 t^{-2/3}(1-t)^{-1/3}dt=\int_{\pi/3}^0 (\cos x)^{-2/3}(1-\cos x)^{-1/3}(-\sin x)dx

[/tex]

[tex]

=\int_0^{\pi/3}(\cos x)^{-2/3}(2(\sin\frac{x}{2})^2)^{-1/3}2\sin\frac{x}{2}\cos\frac{x}{2}dx

=\int_0^{\pi/3}(\cos x)^{-2/3}2^{2/3}(\sin\frac{x}{2})^{1/3}\cos\frac{x}{2}dx

[/tex]

Similar tricks can be applied for the t integral over (0, 1/2) interval.

The purpose of splitting an integral range is to avoid numerical errors when evaluating integrals that contain singularities. Singularities are points where the function being integrated becomes infinite or undefined, making it difficult to accurately calculate the integral.

The integral range should be split at the location of the singularity. This can be determined by finding the roots of the function being integrated or by using a graphing tool to visualize where the function becomes infinite or undefined.

In some cases, splitting the integral range can improve the accuracy of the integral by avoiding numerical errors near the singularity. However, if the integral range is split into too many sub-intervals, it can increase the overall error of the calculation.

Yes, there are other methods such as using change of variables or applying special integration techniques for specific types of singularities. Some numerical integration methods also have built-in algorithms for handling singularities.

No, splitting the integral range is not always necessary. If the singularity is removable (meaning the function can be redefined at that point), then it can be treated as a regular integral. Additionally, some numerical integration methods are designed to handle certain types of singularities without the need for splitting the integral range.

- Replies
- 2

- Views
- 889

- Replies
- 3

- Views
- 882

- Replies
- 16

- Views
- 2K

- Replies
- 3

- Views
- 1K

- Replies
- 2

- Views
- 739

- Replies
- 3

- Views
- 1K

- Replies
- 10

- Views
- 2K

- Replies
- 22

- Views
- 2K

- Replies
- 5

- Views
- 1K

- Replies
- 9

- Views
- 2K

Share: