1
$\begingroup$

I am trying to use DSolve in order to solve the following equation:

$\qquad \rho'' +\Omega^2 \rho -\frac{1}{\rho^3}$,

where $\rho=\rho(t)$ and $\Omega$ is a constant. I know that

$\qquad \rho = \frac{1}{\Omega} \{\frac{A^2}{E^2}\, Cos(\Omega t)^2+\frac{B^2}{E^2}Sin(\Omega t)^2) +2 (\frac{A^2}{E^2}\frac{B^2}{E^2}-\Omega^2)^{1/2} Sin(\Omega t)\,Cos(\Omega t) \}^{1/2}$

is a solution, but Mathematica does not give me this among the solution.

In particular

DSolve[ {ρ''[t] + Ω^2   ρ[t] - 1/(ρ[t])^3 == 0},  ρ[t], t,  
  Assumptions -> {Ω ∈ Reals  && t ∈ Reals}]

returns

{
 {ρ[t] -> -(Sqrt[E^(-4 I Ω (t + C[2])) - 4 Ω^2 + 2 E^(-2 I Ω (t + C[2])) C[1] + C[1]^2]/(2 Sqrt[E^(-2 I Ω (t + C[2]))] Ω))}, 
 {ρ[t] -> Sqrt[E^(-4 I Ω (t + C[2])) - 4 Ω^2 + 2 E^(-2 I Ω (t + C[2])) C[1] + C[1]^2]/(2 Sqrt[E^(-2 I Ω (t + C[2]))] Ω)}, 
 {ρ[t] -> -(Sqrt[E^(4 I Ω (t + C[2])) - 4 Ω^2 + 2 E^(2 I Ω (t + C[2])) C[1] + C[1]^2]/(2 Sqrt[E^(2 I Ω (t + C[2]))] Ω))}, 
 {ρ[t] -> Sqrt[E^(4 I Ω (t + C[2])) - 4 Ω^2 + 2 E^(2 I Ω (t + C[2])) C[1] + C[1]^2]/(2 Sqrt[E^(2 I Ω (t + C[2]))] Ω)}}
}

Note that $\Omega$ is real. I I want a real solution for $\rho$ too.

$\endgroup$
2
$\begingroup$

Mathematica gives a real solution, not realy obvious!!!

sol = DSolve[{ρ''[t] + Ω^2 ρ[t] - 1/(ρ[t])^3 == 0}, ρ[t], t,Assumptions -> {Ω ∈ Reals && t ∈ Reals}]

simplification by hand in 2 steps:

sol1 = sol // ExpToTrig
sol2=sol1 /. Sin[p_] -> I Sinh[p]

(*{{ρ[t] -> -((√(-4 Ω^2 + C[1]^2 + 
      2 C[1] Cos[2 Ω (t + C[2])] + 
      Cos[4 Ω (t + C[2])] + 
      2 C[1] Sinh[2 Ω (t + C[2])] + 
      Sinh[4 Ω (t + 
          C[2])]))/(2 Ω Sqrt[
    Cos[2 Ω (t + C[2])] + 
     Sinh[2 Ω (t + C[2])]]))}, 
{ρ[t] -> (√(-4 Ω^2 + C[1]^2 + 
    2 C[1] Cos[2 Ω (t + C[2])] + 
    Cos[4 Ω (t + C[2])] + 
    2 C[1] Sinh[2 Ω (t + C[2])] + 
    Sinh[4 Ω (t + C[2])]))/(2 Ω Sqrt[
  Cos[2 Ω (t + C[2])] + 
   Sinh[2 Ω (t + C[2])]])}, 
{ρ[t] -> -((√(-4 Ω^2 + C[1]^2 + 
      2 C[1] Cos[2 Ω (t + C[2])] + 
      Cos[4 Ω (t + C[2])] - 
      2 C[1] Sinh[2 Ω (t + C[2])] - 
      Sinh[4 Ω (t + 
          C[2])]))/(2 Ω Sqrt[
    Cos[2 Ω (t + C[2])] - 
     Sinh[2 Ω (t + C[2])]]))}, 
 {ρ[t] -> (√(-4 Ω^2 + C[1]^2 + 
    2 C[1] Cos[2 Ω (t + C[2])] + 
    Cos[4 Ω (t + C[2])] - 
    2 C[1] Sinh[2 Ω (t + C[2])] - 
    Sinh[4 Ω (t + C[2])]))/(2 Ω Sqrt[
  Cos[2 Ω (t + C[2])] - 
   Sinh[2 Ω (t + C[2])]])}}*)
$\endgroup$
  • $\begingroup$ Ok, but is there a way to tell Mathematica to show me the solution straight in this form? $\endgroup$ – rob Feb 3 '19 at 17:17
  • $\begingroup$ sol // ExpToTrig /. Sin[p_] -> I Sinh[p] $\endgroup$ – Ulrich Neumann Feb 4 '19 at 10:25

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.