6
$\begingroup$

I have the following problem:

I'd like to show how the Lane-Emden equation would look like if someone would solve it as a series.

Here's the code:

θGrad = 4
θReihe[z_] = 1 + Plus @@ Table[Subscript[a, i] z^i, {i, 2, 
θGrad}] + O[z]^(θGrad + 1)

θn[z_] = Series[θ[z], {z, 0, 7}]

LEGL = 1/z^2 D[z^2 D[θReihe[z], z]] + θReihe[z]^n

Unbek = Table[Subscript[a, i], {i, 2, θGrad}]

KoeffList = CoefficientList[Normal[LEGL], z]

Lösung = Solve[Thread[KoeffList == 0][[2 ;; 4]], Unbek]

The problem here is that no solution was found, when it should look like what I found on this site.

It would be very nice if somebody could find my mistake and tell me what I need to do to get it right.

$\endgroup$
3
  • $\begingroup$ Many many (15?) years ago I wrote this, which may be of help. $\endgroup$ Commented Nov 5, 2015 at 16:08
  • $\begingroup$ Ah, I just noticed that the OP's link was to my old work. I haven't taken a look at it in years. $\endgroup$ Commented Nov 5, 2015 at 16:13
  • $\begingroup$ @DavidReiss I converted your answer to a comment, hope you don't mind. It fits here better. $\endgroup$
    – Kuba
    Commented Mar 25, 2018 at 10:11

2 Answers 2

6
$\begingroup$

Here's a starting point (borrowing the notation from here):

With[{n = 5, m = 10},
     (θ = 1 + Sum[C[k] ξ^k, {k, 2, m}] + O[ξ]^(m + 1)) /. 
     First[SolveAlways[ξ D[θ, {ξ, 2}] + 2 D[θ, ξ] + ξ θ^n == 0, ξ]]]
   1 - ξ^2/6 + ξ^4/24 - 5 ξ^6/432 + 35 ξ^8/10368 - 7 ξ^10/6912 + O[ξ]^11

Compare:

Series[1/Sqrt[1 + ξ^2/3], {ξ, 0, 10}]
   1 - ξ^2/6 + ξ^4/24 - 5 ξ^6/432 + 35 ξ^8/10368 - 7 ξ^10/6912 + O[ξ]^11
$\endgroup$
3
$\begingroup$

On MMA 11.3:

AsymptoticDSolveValue[ξ*θ''[ξ] + 2*θ'[ξ] + ξ*θ[ξ]^n == 0, θ[ξ], {ξ, 0, 7}]

(* C[1] - 1/6 ξ^2 C[1]^n + 1/120 n ξ^4 C[1]^(-1 + 2 n) - (
n (-5 + 8 n) ξ^6 C[1]^(-2 + 3 n))/15120 + ξ C[2] *)
$\endgroup$

Your Answer

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

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