0
$\begingroup$

I need to plot g1, g2, g3 and g4 expressions. To do that, I am trying to evaluate the double defined integral in the three expressions, however I am having issues because one of the integration limits (alpha) is function of w. The resultante error says:

NIntegrate::nlim: α = α is not a valid limit of integration.

The question here is how can I compute a definite integral if I have a symbolic limit? Is it possible to do that?

Otherwise, is there anothet way to calculate and plot these expressions solving the indefinite integral?

Thanks in advance.

d = 0.0254;
ad = 0.3;
a = ad*d;
young = 210 10^9;
iner = (Pi/64)*d^4;
ld = 24;
L = ld*d;
wcord = Sqrt[a*(d - a)];

α = a - (d/2) + Sqrt[((d/2)^2) - (w^2)];
αp = Sqrt[d^2 - (2*w)^2];
rα = α/αp;
F = Sqrt[(2*αp)/(Pi*α)*Tan[(Pi*α)/(2*αp)]]*((0.923 + 0.199*(1 - Sin[(Pi*[Alpha])/(2*αp)])^4)/Cos[(Pi*α)/(2*αp)]);

Fp = Sqrt[(2*αp)/(Pi*α)*Tan[(Pi*α)/(2*αp)]]*((0.752 + 2.02*rα + 0.37*(1 - Sin[(Pi*α)/(2*αp)])^3)/Cos[(Pi*α)/(2*αp)]);

flxbInt = L^3/(48*young*iner) ;

g1 = flxbInt + 2*(NIntegrate[((128*(L^2)*(αp^2))/(young*Pi*(d^8)))*α*F^2, {α, 0, α}, {w, 0, wcord}])      

g4 = flxbInt + 2*(NIntegrate[((512*(L^2)*(w^2))/(young*Pi*(d^8)))*α*Fp^2, {α, 0, α}, {w, 0, wcord}])     

g2 = g3 = 2*(NIntegrate[((256*(L^2)*αp*w)/(young*Pi*(d^8)))*α*F*Fp, {α, 0, α}, {w, 0, wcord}])       

code

$\endgroup$
  • $\begingroup$ There is a type in the definition of F; also, change the dummy integration variable. $\endgroup$ – b.gates.you.know.what Oct 28 '16 at 7:24
  • $\begingroup$ Welcome to Mathematica.SE! 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – user9660 Oct 28 '16 at 8:39
1
$\begingroup$

The most direct way of tackling this problem is defining a unnesting the integrals, converting to functions, and using NIntegrate

As before:

d = 0.0254;
ad = 0.3;
a = ad*d;
young = 210 10^9;
iner = (Pi/64)*d^4;
ld = 24;
L = ld*d;
wcord = Sqrt[a*(d - a)];

\[Alpha] = a - (d/2) + Sqrt[((d/2)^2) - (w^2)];
\[Alpha]p = Sqrt[d^2 - (2*w)^2];
r\[Alpha] = \[Alpha]/\[Alpha]p;

F = Sqrt[(2*\[Alpha]p)/(Pi*\[Alpha])*Tan[(Pi*\[Alpha])/(2*\[Alpha]p)]]*((0.923 + 0.199*(1 - Sin[(Pi*\[Alpha])/(2*\[Alpha]p)])^4)/Cos[(Pi*\[Alpha])/(2*\[Alpha]p)]);
Fp = Sqrt[(2*\[Alpha]p)/(Pi*\[Alpha])*Tan[(Pi*\[Alpha])/(2*\[Alpha]p)]]*((0.752 + 2.02*r\[Alpha] + 0.37*(1 - Sin[(Pi*\[Alpha])/(2*\[Alpha]p)])^3)/Cos[(Pi*\[Alpha])/(2*\[Alpha]p)]);
flxbInt = L^3/(48*young*iner);

Now define

i1[z_?NumericQ] := NIntegrate[k, {k, 0, z}];

Rewriting the integrals in terms of our new function i1

g1 = flxbInt + 2*(NIntegrate[((128*(L^2)*(\[Alpha]p^2))/(young*Pi*(d^8)))*i1[\[Alpha]]*F^2, {w, 0, wcord}])
g4 = flxbInt + 2*(NIntegrate[((512*(L^2)*(w^2))/(young*Pi*(d^8)))*i1[\[Alpha]]*Fp^2, {w, 0, wcord}])
g2 = g3 = 2*(NIntegrate[((256*(L^2)*\[Alpha]p*w)/(young*Pi*(d^8)))*i1[\[Alpha]]*F*Fp, {w, 0, wcord}])

Evaluating the integrals yields:

(*g1 = 1.20937*10^-6*)
(*g4 = 1.13447*10^-6*)
(*g2 = g3 = 4.88326*10^-8*)
$\endgroup$
  • $\begingroup$ Thanks, your answer was very helpful. $\endgroup$ – SalvaB84 Nov 15 '16 at 17:29
  • $\begingroup$ In case I need a symbolic expression for each variable g. Do you think there is some way to get it? $\endgroup$ – SalvaB84 Nov 17 '16 at 18:45
  • $\begingroup$ I don't think you are going to be able to find an analytical expression for each integral. I would suggest sticking with numerics for this problem, though I don't want to close the door completely to the possibility that a solution exists. $\endgroup$ – Marchi Nov 17 '16 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.