How to solve improper integral '1/sin(x)' at region with variables
7 views (last 30 days)
Show older comments
Chanho Jeong
on 24 May 2016
Commented: Bjorn Gustavsson
on 24 May 2016
I'd like to solve
syms x h
int(1/sin(x), x, h, 1) %%when 0<h<1
But matlab can't solve it. Probably because it doesn't consider the region of 'h'. So during the calculation it has infinite value.
Contrastively, the integral works for
syms x h
int(sin(x), x, h, 1)
ans =
cos(h) - cos(1)
Is there any good method to give simply a condition for 'h'?
As a second alternative plan(not really what i prefer,though) , i tried
syms x h
h=0.2:0.2:0.8;
int(1/sin(x), x, h, 1)
But It gave me errors for different reasons. I'll appreciate for any help. Thanks
0 Comments
Accepted Answer
Bjorn Gustavsson
on 24 May 2016
For rational functions of trigonometric functions use the substitution z = tan(x/2) - see for example:
2 Comments
Bjorn Gustavsson
on 24 May 2016
If you try pretty on the integrand you'll see that it's a bit complicated with the square root...
pretty((-3200*(1 - (h - 40)^2/(1600*(2*t/(1+t^2))^2))^(1/2))*2/(1+t^2))
That indicates that a symbolic integral might be difficult to find, try some handbooks to see if this is something "well-known"...
HTH
More Answers (0)
See Also
Categories
Find more on Special Values in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!