1

I see this variational problem here.

The functional is : $$J(y)=y^{2}(x_{0})+\int_{x_{0}}^{x_{1}}(xy+y'^{2}) dx$$ In the textbook, the result of finding the functional variation according to the functional variation defined by Lagrange is :

enter image description here

The variation sign δ has the following basic operational properties :

enter image description here enter image description here enter image description here enter image description here

How to use MMA to define a correlation function and find the variation of this function according to the definition of Lagrange?

I really want to solve this problem, but when I replace y with y+ε*δ, it can't be expanded linearly, so I can't do further calculation.

f[x] /. f :> f + ε*δ
f'[x] + f[x] /. f :> f + ε*δ

I want to get the following result according to the linear operation rule of variation mentioned above:

f[x] + ε*δ f[x]
(f'[x] + ε*δ f'[x]) + (f[x] + ε*δ f[x])

But the above code cannot be expanded obviously. Please help me.

The title of the book is 《变分法基础》, the author is 老大中. And the relevant content is on page 59 to page 63.

enter image description here

You can get a photocopy of this book from here. The password of the online disk is wthj.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574

2 Answers2

2

To obtain the formal variation for the given functional we can use

J[y_, x_, x0_, x1_] := (y^2 /. {x -> x0}) + Integrate[x y + D[y, x]^2, {x, x0, x1}]
varJ[J_, y_, x_, x0_, x1_] := D[J[y + epsilon delta[y], x, x0, x1], epsilon] /. {epsilon -> 0}

varJ[J, y[x], x, x0, x1]

Regarding the result obtained

$$ \delta J(y) = 2\delta(y(x_0))y(x_0)+\int_{x_0}^{x_1}(x\delta(y)+2\delta'(y)(y')^2)dx $$

NOTE

The operator should be able to detect

$$ \delta'(y)(y')^2 = (\delta(y))'y' = (\delta(y)y')'-\delta(y)y'' $$

concluding with

$$ \int_{x_0}^{x_1}(x\delta(y)+2\delta'(y)(y')^2)dx = \int_{x_0}^{x_1}(x-2y'')\delta(y)dx-\delta(y)y'|_{x_0}^{x_1} $$

Cesareo
  • 3,963
  • 7
  • 11
  • Thanks a lot. But your variational sign $δ$ does not perform the variational correlation operation like the differential sign $d$, and the result is not consistent with that in the textbook. – A little mouse on the pampas Feb 21 '20 at 02:04
  • 2
    The operator $\delta(y)$ performs an action very similar to a differentiation. With the results in hand, we can choose which properties apply. – Cesareo Feb 21 '20 at 09:59
  • This is what I mean. Can you write down the specific implementation process? – A little mouse on the pampas Feb 21 '20 at 10:10
  • 1
    Please. See attached note. – Cesareo Feb 21 '20 at 11:11
  • Thank you very much, but the result of the code above is 2 y[x0] delta[y[x0]] + Integrate[(2 Derivative[1][y][x]^2 Derivative[1][delta][y[x]] + x delta[y[x]]) \[DifferentialD]x, {x, x0, x1}], while the result of the textbook is 2 y[x0] delta[y[x0]] + Integrate[(2 Derivative[1][y][x] Derivative[1][delta][y[x]] + x delta[y[x]]) \[DifferentialD]x, {x, x0, x1}], they are slightly different.How to modify them to be the same? – A little mouse on the pampas Feb 22 '20 at 07:26
1

I am not sure if VariationalMethods`VariationalD works properly for this problem, but worthy of trying, I suppose.

<< VariationalMethods`

Clear[J]
J = y[x0]^2 + Integrate[x y[x] + y'[x]^2, {x, x0, x1}];

VariationalD[J, y[x], x]

1/2 (-x0^2 + x1^2)