Help me for solving this integral

hello iam trying to solve this integral
so i write the script in matlab as follows :
syms x
v = 45.12 ; %normal velocity
r = 418.87 ; %angular velocity at 4000 rpm
ratio = 91 ; %max lift/drag coeff. @ alpha = 10 degree
chord = 0.2 ; %chord length
row = 1.225 ; %air density
l = (0.5*ratio*chord*row*((v^2)+(r*x-u*x)^2)); %lift func.
c = (r*x-0.5*u*x)/((v^2)+(r*x-0.5*u*x)^2)^0.5; %cos func.
t = (l*c); %total lift func.
a = int(t , 0.15 , 0.45);
display('lift: '), disp(double(a));
Solution
t =
(31887*x*((2136042788971*x^2)/4000000 + 19962065511551291219/879609302220800))/(100*((1016780769*x^2)/10000 + 4476803209587641/2199023255552)^(1/2))
lift: 2.0311e+004
the problem is the solution is not logic because this equation is function in u so u is unknown must appear in result .
could any one tell me how to solve it please ?

 Accepted Answer

John D'Errico
John D'Errico on 10 Nov 2017
Edited: John D'Errico on 10 Nov 2017
Where did you define u?
At no point in the script you show was u ever defined.
So it is certain that you already had used the variable u. It existed before you ran this code, as some numeric variable. In that case, MATLAB used the existing value of u.
You need to write more careful code. When you see a problem, think about what it implies. So if u does not exist, then this code MUST fail. MATLAB would return an error indicating:
Undefined function or variable 'u'.
If u does exist, and is numeric, then you would get a result as you did. You can check that case by
whos u
Finally, if you intended u to be a symbolic unknown in this, then you needed to define it as a symbolic variable, as you did with x.

2 Comments

first of all thank you for you answer its very helpful and i've done what you told me but now i have a problem i want to tell matlab to integrate with respect to x but i donot know how to write it :) could you tell me please ?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!