Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

As shown in the following codes,

lamda1 = 1.875; L = 0.2; bL = 0.015; hL = 0.005; rouL = 2550; mL = rouL*bL*hL*L; roL =
mL/L; gama1 = (Cosh[lamda1] + Cos[lamda1])/(Sinh[lamda1] + Sin[lamda1]); 
phi1 = Cosh[lamda1*(x/L)] - Cos[lamda1*(x/L)] - gama1*(Sinh[lamda1*(x/L)] - Sin[lamda1*
(x/L)]); 
fe1 = Cosh[lamda1*(sigmma/L)] - Cos[lamda1*(sigmma/L)] - gama1*(Sinh[lamda1*(sigmma/L)] -
Sin[lamda1*(sigmma/L)]); z1 = D[fe1, sigmma]; z21 = z1^2; 
fec1 = -0.5*Integrate[z21, {sigmma, 0, x}]; ux = fec1*q4[t]^2; uy = phi1*q4[t]; uf = 
{{ux}, {uy}}; AL = {{Cos[q3[t]], -Sin[q3[t]]}, {Sin[q3[t]], Cos[q3[t]]}}; r0 = {{q1[t]},
{q2[t]}}; 
u0 = {{x}, {0}}; RL = r0 + AL . (u0 + uf); REy = Take[RL /. x -> L, -1]; vRL = D[RL, t];
Print["vRL=", MatrixForm[vRL]]; intTL = ExpandAll[Transpose[vRL] . vRL]; Print["intTL=",
intTL]; 
FullSimplify[Re[Integrate[intTL, {x, 0, L}]], Assumptions -> Element[{q1[t], q2[t], 
q3[t], q4[t], Derivative[1][q1][t], Derivative[1][q2][t], Derivative[1][q3][t],
     Derivative[1][q4][t]}, Reals]]

How could I get real numbers instead of imaginary ones?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

You deleted your previous code. Here is a way to deal with the current one:

Chop@FullSimplify[Integrate[intTL, {x, 0, L}], Assumptions -> 
  Element[{q1[t], q2[t], q3[t], q4[t], Derivative[1][q1][t], Derivative[1]q2][t],
                                       Derivative[1][q3][t], Derivative[1][q4][t]}, Reals]]

--- The proposed solution to your previous equation --

Probably

FullSimplify[
 Re@Integrate[-7.79*q4[t]^2*Sin[18.75*x]*Sin[q3[t]]^2*Sinh[18.75*x]* Derivative[1][q4][t]^2 - 
    104*Cos[9.375*x]*Cos[q3[t]]^2*q4[t]^2*Sinh[9.375*x]*Sinh[18.75*x]* Derivative[1][q4][t]^2 - 
    104*Cos[9.375*x]*q4[t]^2*Sin[q3[t]]^2*Sinh[9.375*x]*Sinh[18.75*x]* Derivative[1][q4][t]^2 + 
    13*Cos[q3[t]]^2*q4[t]^2*Sinh[18.75*x]^2*Derivative[1][q4][t]^2 + 
    13*q4[t]^2*Sin[q3[t]]^2*Sinh[18.75*x]^2*Derivative[1][q4][t]^2, {x, 0, 1}], 
 Assumptions -> Element[{q3[t], q4[t], Derivative[1][q4][t]}, Reals]]

(* -> (1.67588*10^15 - 7.90059*10^6 Cos[2 q3[t]]) q4[t]^2 Derivative[1][q4][t]^2 *)
share|improve this answer
    
Thanks, it works! –  SunnySky Sep 20 '12 at 2:47
    
I have tried this method to another program, but it failed. and I have sent the code to you by email, could you help me? –  SunnySky Sep 20 '12 at 3:11
    
@SunnySky Edit your question and add that code. That way, anyone here can help you –  belisarius Sep 20 '12 at 3:13
    
Now the post has been modified, could you help me? –  SunnySky Sep 20 '12 at 4:13
    
thanks for your help. –  SunnySky Sep 20 '12 at 6:28
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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