0
$\begingroup$

I have to find the function $\rho(r)$ that extremizes the functional $F$:

A = (Log[2] - 1)/(2 Pi^2);
b = 20.4562557;
rs[r_] := (3/(4 Pi \[Rho][r]))^(1/3);
F = 2.84 \[Rho][r]^(5/3) + (-(3/4) (3/Pi)^(1/3) \[Rho][r]^(1/3) + A*Log[b/rs[r] + b/rs[r]^2 + 1]) \[Rho][r] - 79/r \[Rho][r];

under the condition that $\int\rho(r)dr=79$.

I read the documentation, but it seems not really helpful in this case, since I do not know in advance the functional form of $\rho(r)$.

How can I solve this problem?

$\endgroup$
2
$\begingroup$

The general gist of it is:

1: Obtain the Euler equation for ρ[r] with EulerEquations:

eulerEqs = EulerEquations[F, ρ[r], r]

2: Solve eulerEqs for ρ[r]. Usually this involves DSolve or NDSolve, but by the looks of it your problem doesn't have derivatives. Generally, you will also need to formulate boundary conditions (which you need to modify to match your integral constraint).

There are ways to modify your functional F with a Lagrange multiplier to take into account the integral constraint, but I cannot recall exactly how. You'd have to look that up in a textbook on the subject.

$\endgroup$

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.