0
$\begingroup$

I am trying to evaluate the integral

$$ \int_0^{2\pi}\frac{D_{11}^2+2D_{12}^2+D_{22}^2+D_{33}^2}{1+e\cos x(t)}dx $$

Where $D_{ij}$ are third derivatives wrt $t$ as defined below.

a[psi_] := k1/(1 + e*Cos[psi]);
d[psi_] := p1/(1 + e*Cos[psi]);
D11 = D[a[x[t]]*(Cos[x[t]]^2 - 1/3), {t, 3}];
D12 = D[a[x[t]]*Cos[x[t]]*Sin[x[t]], {t, 3}];
D22 = D[a[x[t]]*(Sin[x[t]]^2 - 1/3), {t, 3}];
D33 = D[-a[x[t]]/3];

To do this I have written the input

Assuming[Element[k1, Reals] && Element[e, Reals] && 
x'[t] == p2/(d[x[t]]^2) && Element[p2, Reals] && 
Element[p2, Reals], 
Integrate[(D11^2 + 2*D12^2 + D22^2 + D33^2)/(1 + e*Cos[x[t]])^2, {x[
t], 0, 2*Pi}]]

This is taking a very long time to evaluate, is it OK to specify to Mathematica that I have the condition $\dot{x}=\frac{p_2}{d(x(t))^2}$ in this manner? How could this be sped up?

EDIT: I have re-written this without subscripts.

$\endgroup$
3
  • 2
    $\begingroup$ To warn you at the outset: using subscripts for anything other than pretty formatting will give you nothing but inconvenience; avoid them altogether. $\endgroup$ Oct 11, 2018 at 16:00
  • $\begingroup$ @J.M.issomewhatokay. in the sense that it is a pain to type, certainly. It won't do anything to my calculation though, right? $\endgroup$
    – tbfr416
    Oct 11, 2018 at 16:12
  • 2
    $\begingroup$ Subscripts will harm your calculation because they appear to the human as a variable or symbol but to the kernel as a formatting construct. Just use D11 and D23 instead. $\endgroup$
    – bill s
    Oct 11, 2018 at 16:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.