MATLAB Answers

## Integration in matlab: Explicit integral could not be found

Asked by satendra kumar

### satendra kumar (view profile)

on 8 Dec 2012
Accepted Answer by Walter Roberson

### Walter Roberson (view profile)

H=1,R=1,theta=20;
syms x;
syms alpha;
%sigma=F/(2*pi*R*(alpha-1));
z_desh=((x/alpha*x^2+1-alpha)^2-1)^-.5
beta=(sin(theta)+(sin(theta)*sin(theta)+4*alpha*(alpha-1)))/2*alpha
eq=int(z_desh,x,4,1)
when i run the above code en error show like: Warning: Explicit integral could not be found. How to solve this.?
Thanks

#### 0 Comments

Sign in to comment.

## 1 Answer ### Walter Roberson (view profile)

Answer by Walter Roberson

### Walter Roberson (view profile)

on 8 Dec 2012
Accepted Answer

First thing to do is heck whether the x/alpha*x^2 is really what you meant. If it was, why not say x^3/alpha ?
Next, check whether you really want to integrate from 4 down to 1, instead of from 1 to 4.
Thirdly, check why you define beta but then do not use it in what is being integrated.
If your integral is exactly as shown, then there is no readily available analytic form for it. A small number of values of alpha lead to analytic forms; the others do not.

Walter Roberson

### Walter Roberson (view profile)

on 8 Dec 2012
Your beta is missing a square root.
beta = (sin(theta) + sqrt(sin(theta)^2 + 4 * alpha * (alpha-1))) / (2*alpha)
My tests so far seem to be indicating that alpha must be at least 1, not less than 1.
satendra kumar

### satendra kumar (view profile)

on 8 Dec 2012
That's a relief. Thanks man. May i have your code pls.
Walter Roberson

### Walter Roberson (view profile)

on 8 Dec 2012
My code is in Maple, using a facility of Maple that does not translate directly into the MuPAD Symbolic Toolbox
What I determined in the end is that you had better use numeric integration and something like fsolve(), instead of trying to use symbolic integration.
When you do your fsolve(), do not use an alpha less than 1: it is not difficult to demonstrate that alpha between 0 and 1 will generate integrals involving complex values.

Sign in to comment.