<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel>
<title>Conan Xu · Blog</title>
<link>https://conanxu-math.github.io/en/</link>
<description>数学、代码与持续学习。Mathematics, code, and lifelong learning.</description>
<language>en</language>
<atom:link href="https://conanxu-math.github.io/en/feed.xml" rel="self" type="application/rss+xml"/>
<item><title>From gradients to variations: stationarity, constraints, and discretization</title><link>https://conanxu-math.github.io/en/blog/optimization-variations-and-discretization/</link><guid>https://conanxu-math.github.io/en/blog/optimization-variations-and-discretization/</guid><pubDate>Wed, 14 Oct 2026 00:00:00 +0800</pubDate><description>&lt;p&gt;In finite-dimensional optimization, we often write \(\nabla f(x)=0\). In the calculus of variations, we encounter \(\delta\mathcal J/\delta x=0\) and then the Euler–Lagrange equation. How are these conditions related? Where do the KKT conditions for constrained optimization belong?&lt;/p&gt;

&lt;p&gt;A useful starting point is a single operation: &lt;strong&gt;choose a candidate, perturb it in an admissible direction, and calculate the first-order change in the objective.&lt;/strong&gt; The candidate may be a vector or an entire function. Changing its space changes how the first-order condition is represented.&lt;/p&gt;

&lt;p&gt;This note follows that viewpoint through directional derivatives, first variations, Euler–Lagrange equations, constraint multipliers, and Galerkin discretization.&lt;/p&gt;

&lt;h2 id=&quot;1-start-with-the-first-order-change-along-admissible-perturbations&quot;&gt;1. Start with the first-order change along admissible perturbations&lt;/h2&gt;

&lt;p&gt;Suppose a direction \(h\) is admissible in both signs: \(x+\varepsilon h\) remains feasible for sufficiently small positive and negative \(\varepsilon\). If \(x^\star\) is a local extremum, then&lt;/p&gt;

\[\varepsilon\longmapsto f(x^\star+\varepsilon h)\]

&lt;p&gt;has a local extremum at zero. Consequently,&lt;/p&gt;

\[Df(x^\star)[h]=0.\]

&lt;p&gt;Requiring this for every admissible direction gives stationarity. The availability of both signs matters. At the boundary of an inequality constraint, a feasible direction may be one-sided, and the first-order condition need not be an equality.&lt;/p&gt;

&lt;p&gt;The reasoning has four steps:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Choose the space of candidate objects.&lt;/li&gt;
  &lt;li&gt;Identify the admissible perturbation directions.&lt;/li&gt;
  &lt;li&gt;Calculate the first-order change in the objective.&lt;/li&gt;
  &lt;li&gt;Impose the corresponding first-order optimality condition.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Stationarity is generally a necessary condition for local optimality. Establishing a minimum requires additional information, such as convexity or second-order conditions.&lt;/p&gt;

&lt;h2 id=&quot;2-why-finite-dimensional-optimization-gives-a-zero-gradient&quot;&gt;2. Why finite-dimensional optimization gives a zero gradient&lt;/h2&gt;

&lt;p&gt;Consider a differentiable, unconstrained problem&lt;/p&gt;

\[\min_{x\in\mathbb R^n} f(x).\]

&lt;p&gt;For an arbitrary direction \(h\in\mathbb R^n\), define&lt;/p&gt;

\[Df(x)[h]
=
\left.
\frac{\mathrm d}{\mathrm d\varepsilon}
f(x+\varepsilon h)
\right|_{\varepsilon=0}.\]

&lt;p&gt;Under the Euclidean inner product,&lt;/p&gt;

\[Df(x)[h]=\nabla f(x)^\top h.\]

&lt;p&gt;At a local minimum \(x^\star\),&lt;/p&gt;

\[\nabla f(x^\star)^\top h=0,
\qquad \forall h\in\mathbb R^n.\]

&lt;p&gt;Choosing \(h=\nabla f(x^\star)\) yields&lt;/p&gt;

\[\|\nabla f(x^\star)\|^2=0,
\qquad
\boxed{\nabla f(x^\star)=0}.\]

&lt;p&gt;The more fundamental statement is &lt;strong&gt;\(Df(x^\star)=0\)&lt;/strong&gt;. The derivative is a linear functional acting on a direction; the gradient is its vector representation under an inner product.&lt;/p&gt;

&lt;h2 id=&quot;3-variational-problems-optimize-an-entire-function&quot;&gt;3. Variational problems optimize an entire function&lt;/h2&gt;

&lt;p&gt;Now let the candidate be an entire function \(x(\cdot)\), and let the objective be a functional&lt;/p&gt;

\[\mathcal J[x]\in\mathbb R.\]

&lt;p&gt;Three symbols play different roles:&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Symbol&lt;/th&gt;
      &lt;th&gt;Meaning&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;\(t\)&lt;/td&gt;
      &lt;td&gt;An independent coordinate within the function, often time or position&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;\(x(t)\)&lt;/td&gt;
      &lt;td&gt;The function’s value at that coordinate&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;\(x(\cdot)\)&lt;/td&gt;
      &lt;td&gt;The entire function, viewed as one candidate object&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Let \(\mathcal A\) be the admissible set and \(V\) the linear space of allowed perturbations. Start with the affine setting&lt;/p&gt;

\[\mathcal A=x_b+V.\]

&lt;p&gt;The fixed feasible function \(x_b\) can carry nonzero boundary values, while perturbations \(\eta\in V\) preserve the boundary conditions. For \(x\in\mathcal A\), write&lt;/p&gt;

\[x_\varepsilon(t)=x(t)+\varepsilon\eta(t).\]

&lt;p&gt;Assuming Fréchet differentiability with respect to these perturbations, the first variation is&lt;/p&gt;

\[\delta\mathcal J[x;\eta]
:=
D\mathcal J[x][\eta]
=
\left.
\frac{\mathrm d}{\mathrm d\varepsilon}
\mathcal J[x+\varepsilon\eta]
\right|_{\varepsilon=0}.\]

&lt;p&gt;The first-order condition at a local extremum is&lt;/p&gt;

\[\boxed{
D\mathcal J[x^\star][\eta]=0,
\qquad \forall\eta\in V.
}\]

&lt;p&gt;Its structure is the same as \(Df(x^\star)[h]=0\) in finite dimensions.&lt;/p&gt;

&lt;h3 id=&quot;a-first-variation-is-not-the-same-object-as-a-functional-derivative&quot;&gt;A first variation is not the same object as a functional derivative&lt;/h3&gt;

&lt;p&gt;The initial object is&lt;/p&gt;

\[D\mathcal J[x]\in V^*,\]

&lt;p&gt;a continuous linear functional on the perturbation space. If \(V\) is a Hilbert space, the Riesz representation gives a gradient satisfying&lt;/p&gt;

\[D\mathcal J[x][\eta]
=
\langle\operatorname{grad}_V\mathcal J[x],\eta\rangle_V.\]

&lt;p&gt;The gradient depends on the inner product. The statement that the derivative is zero does not depend on how that derivative is represented.&lt;/p&gt;

&lt;p&gt;For the common \(L^2\) pairing, suppose there is a function \(g\in L^2\) such that&lt;/p&gt;

\[D\mathcal J[x][\eta]
=
\int_{t_0}^{t_1}g(t)\eta(t)\,\mathrm dt,
\qquad \forall\eta\in V.\]

&lt;p&gt;We write this representative as&lt;/p&gt;

\[g(t)=\frac{\delta\mathcal J}{\delta x}(t).\]

&lt;p&gt;If \(V\) is dense in \(L^2\), vanishing first variation for every perturbation is equivalent to \(g=0\) almost everywhere. Smooth, compactly supported perturbations already suffice for this conclusion in a fixed-endpoint problem.&lt;/p&gt;

&lt;p&gt;A general function-space derivative need not have an ordinary \(L^2\) representative. In that case, the derivative acting on perturbations, or its weak form, remains the appropriate object.&lt;/p&gt;

&lt;h2 id=&quot;4-deriving-the-eulerlagrange-equation&quot;&gt;4. Deriving the Euler–Lagrange equation&lt;/h2&gt;

&lt;p&gt;Consider the integral functional for a scalar function&lt;/p&gt;

\[\mathcal J[x]
=
\int_{t_0}^{t_1}
\mathcal L\bigl(t,x(t),\dot x(t)\bigr)\,\mathrm dt,
\qquad
\dot x=\frac{\mathrm dx}{\mathrm dt}.\]

&lt;p&gt;Let \(\mathcal L\) be \(C^2\), and fix the endpoints:&lt;/p&gt;

\[x(t_0)=a,\qquad x(t_1)=b.\]

&lt;p&gt;The problem can be posed over \(C^1\) functions with these endpoint values. Admissible perturbations satisfy&lt;/p&gt;

\[\eta(t_0)=\eta(t_1)=0.\]

&lt;p&gt;If the extremal under consideration is additionally \(C^2\), the classical calculation gives&lt;/p&gt;

\[\begin{aligned}
\delta\mathcal J[x;\eta]
&amp;amp;=
\left.
\frac{\mathrm d}{\mathrm d\varepsilon}
\int_{t_0}^{t_1}
\mathcal L(t,x+\varepsilon\eta,\dot x+\varepsilon\dot\eta)
\,\mathrm dt
\right|_{\varepsilon=0}
\\
&amp;amp;=
\int_{t_0}^{t_1}
\left(
\frac{\partial\mathcal L}{\partial x}\eta
+
\frac{\partial\mathcal L}{\partial\dot x}\dot\eta
\right)\,\mathrm dt.
\end{aligned}\]

&lt;p&gt;Integrate the term containing \(\dot\eta\) by parts:&lt;/p&gt;

\[\begin{aligned}
\int_{t_0}^{t_1}
\frac{\partial\mathcal L}{\partial\dot x}\dot\eta\,\mathrm dt
&amp;amp;=
\left[
\frac{\partial\mathcal L}{\partial\dot x}\eta
\right]_{t_0}^{t_1}
\\
&amp;amp;\quad-
\int_{t_0}^{t_1}
\frac{\mathrm d}{\mathrm dt}
\left(\frac{\partial\mathcal L}{\partial\dot x}\right)
\eta\,\mathrm dt.
\end{aligned}\]

&lt;p&gt;The endpoint conditions eliminate the boundary term, leaving&lt;/p&gt;

\[\delta\mathcal J[x;\eta]
=
\int_{t_0}^{t_1}
\left[
\frac{\partial\mathcal L}{\partial x}
-
\frac{\mathrm d}{\mathrm dt}
\left(\frac{\partial\mathcal L}{\partial\dot x}\right)
\right]\eta\,\mathrm dt.\]

&lt;p&gt;This expression must vanish for every admissible perturbation. The fundamental lemma of the calculus of variations therefore gives&lt;/p&gt;

\[\boxed{
\frac{\partial\mathcal L}{\partial x}
-
\frac{\mathrm d}{\mathrm dt}
\left(\frac{\partial\mathcal L}{\partial\dot x}\right)=0.
}\]

&lt;p&gt;This is the Euler–Lagrange equation. Multiplying by \(-1\) gives the equivalent convention&lt;/p&gt;

\[\frac{\mathrm d}{\mathrm dt}
\left(\frac{\partial\mathcal L}{\partial\dot x}\right)
-
\frac{\partial\mathcal L}{\partial x}=0.\]

&lt;p&gt;In this smooth, fixed-endpoint setting,&lt;/p&gt;

\[\frac{\delta\mathcal J}{\delta x}
=
\frac{\partial\mathcal L}{\partial x}
-
\frac{\mathrm d}{\mathrm dt}
\left(\frac{\partial\mathcal L}{\partial\dot x}\right).\]

&lt;p&gt;The Euler–Lagrange equation is thus an explicit form of stationarity for this particular integral functional. With free endpoints, the boundary term must also be considered, producing the corresponding natural boundary conditions.&lt;/p&gt;

&lt;h2 id=&quot;5-what-does-differentiation-with-respect-to-velocity-mean&quot;&gt;5. What does differentiation with respect to velocity mean?&lt;/h2&gt;

&lt;p&gt;First write the integrand as an ordinary multivariable function&lt;/p&gt;

\[\mathcal L(t,q,v).\]

&lt;p&gt;The variables \(t,q,v\) are independent when taking partial derivatives. Differentiate with respect to the third argument, then substitute \(q=x(t)\) and \(v=\dot x(t)\). This is what \(\partial\mathcal L/\partial\dot x\) denotes.&lt;/p&gt;

&lt;p&gt;For example, let the mass \(m&amp;gt;0\) be constant and take&lt;/p&gt;

\[\mathcal L(x,\dot x)=\frac12m\dot x^2-V(x).\]

&lt;p&gt;Then&lt;/p&gt;

\[\frac{\partial\mathcal L}{\partial\dot x}=m\dot x,
\qquad
\frac{\partial\mathcal L}{\partial x}=-V&apos;(x).\]

&lt;p&gt;The Euler–Lagrange equation becomes&lt;/p&gt;

\[m\ddot x+V&apos;(x)=0.\]

&lt;p&gt;The force associated with the potential is&lt;/p&gt;

\[F(x)=-V&apos;(x),\]

&lt;p&gt;so this is precisely \(m\ddot x=F(x)\). The calculation establishes stationarity of the action; whether that stationary path minimizes the action is a separate question.&lt;/p&gt;

&lt;h2 id=&quot;6-dimension-depends-on-degrees-of-freedom-and-coordinates-have-different-roles&quot;&gt;6. Dimension depends on degrees of freedom, and coordinates have different roles&lt;/h2&gt;

&lt;p&gt;An object written as a function of \(t\) need not be infinite-dimensional. For example,&lt;/p&gt;

\[V_n=\operatorname{span}\{\phi_1(t),\ldots,\phi_n(t)\},\]

&lt;p&gt;where the basis functions are linearly independent. Every element has the form&lt;/p&gt;

\[x_n(t)=\sum_{k=1}^n c_k\phi_k(t).\]

&lt;p&gt;There are only \(n\) independent coefficients, so \(V_n\) has dimension \(n\). All quadratic polynomials&lt;/p&gt;

\[x(t)=c_0+c_1t+c_2t^2\]

&lt;p&gt;form a three-dimensional function space. Conversely, the sequence space \(\ell^2\) is infinite-dimensional even though its elements need not be written using a continuous coordinate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dimension is determined by independent degrees of freedom, not by the presence of \(t\) in the notation.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The coordinate \(t\) indexes values within a function. An entire function \(x(\cdot)\) can be fixed while its values at different coordinates differ, just as a fixed vector may have unequal components.&lt;/p&gt;

&lt;p&gt;When the objective contains \(\dot x\), differentiation also couples neighboring positions:&lt;/p&gt;

\[\dot x(t)\approx
\frac{x(t+\Delta t)-x(t)}{\Delta t}.\]

&lt;p&gt;To describe the evolution of an optimization process itself, use another parameter, such as \(\tau\). When an \(L^2\) gradient exists and the evolution is meaningful, the formal gradient flow is&lt;/p&gt;

\[\frac{\partial x_\tau(t)}{\partial\tau}
=
-
\frac{\delta\mathcal J}{\delta x}[x_\tau](t).\]

&lt;p&gt;Here \(t\) is an internal coordinate of the candidate, while \(\tau\) parametrizes the optimization process. Changing the inner product used to represent the gradient changes the descent direction.&lt;/p&gt;

&lt;h2 id=&quot;7-where-kkt-and-function-space-multipliers-belong&quot;&gt;7. Where KKT and function-space multipliers belong&lt;/h2&gt;

&lt;p&gt;Unconstrained finite-dimensional problems lead to gradient stationarity, and unconstrained variational problems lead to vanishing first variation. Constraints add feasibility conditions and dual variables to the first-order system.&lt;/p&gt;

&lt;h3 id=&quot;finite-dimensional-constraints-and-kkt&quot;&gt;Finite-dimensional constraints and KKT&lt;/h3&gt;

&lt;p&gt;Consider&lt;/p&gt;

\[\min_x f(x),
\qquad
g_i(x)\leq 0,\quad h_j(x)=0.\]

&lt;p&gt;Its Lagrangian is&lt;/p&gt;

\[\mathscr L(x,\lambda,\nu)
=
f(x)+\sum_i\lambda_i g_i(x)+\sum_j\nu_j h_j(x).\]

&lt;p&gt;Under an appropriate constraint qualification, a local minimum satisfies the KKT conditions:&lt;/p&gt;

\[\begin{aligned}
\nabla_x\mathscr L(x^\star,\lambda^\star,\nu^\star)&amp;amp;=0,
\\
g_i(x^\star)&amp;amp;\leq 0,
&amp;amp;
h_j(x^\star)&amp;amp;=0,
\\
\lambda_i^\star&amp;amp;\geq 0,
&amp;amp;
\lambda_i^\star g_i(x^\star)&amp;amp;=0.
\end{aligned}\]

&lt;p&gt;They express stationarity, primal feasibility, dual feasibility, and complementary slackness.&lt;/p&gt;

&lt;h3 id=&quot;why-a-dynamic-constraint-introduces-an-adjoint-function&quot;&gt;Why a dynamic constraint introduces an adjoint function&lt;/h3&gt;

&lt;p&gt;Function-space problems also admit constraint multipliers. Finitely many scalar constraints have scalar multipliers; an operator constraint has a multiplier in the dual of its constraint-value space. For familiar smooth dynamic constraints, this multiplier appears as a time-dependent adjoint function.&lt;/p&gt;

&lt;p&gt;Consider a fixed terminal time \(T\), a fixed initial state \(x(0)=x_0\), and a free terminal state:&lt;/p&gt;

\[\min_{x(\cdot),u(\cdot)}
\Phi(x(T))+\int_0^T L(x,u,t)\,\mathrm dt,
\qquad
\dot x=F(x,u,t).\]

&lt;p&gt;Introduce \(\lambda(t)\) and form&lt;/p&gt;

\[\begin{aligned}
\mathscr A[x,u,\lambda]
&amp;amp;=
\Phi(x(T))
\\
&amp;amp;\quad+
\int_0^T
\left[L(x,u,t)+\lambda^\top(F(x,u,t)-\dot x)\right]
\,\mathrm dt.
\end{aligned}\]

&lt;p&gt;Using a minimization convention, define the Hamiltonian&lt;/p&gt;

\[H(x,u,\lambda,t)=L(x,u,t)+\lambda^\top F(x,u,t).\]

&lt;p&gt;In the smooth, normal case with an interior control, stationarity with respect to \(\lambda,x,u\) gives&lt;/p&gt;

\[\boxed{
\dot x=H_\lambda=F,\qquad
\dot\lambda=-H_x,\qquad
H_u=0.
}\]

&lt;p&gt;Variation of \(x\) also produces a terminal term. Because \(x(T)\) is free, it yields&lt;/p&gt;

\[\boxed{\lambda(T)=\nabla\Phi(x(T)).}\]

&lt;p&gt;This calculation shows the origin of the state equation, adjoint equation, and interior-control stationarity condition. With a constrained control set, the control condition must be adjusted; \(H_u=0\) is not universal. The full Pontryagin principle also treats extrema over the control set and normal or abnormal multipliers.&lt;/p&gt;

&lt;p&gt;The relationship is therefore: &lt;strong&gt;Euler–Lagrange expands stationarity for an integral functional; KKT is a first-order multiplier system for constrained optimization.&lt;/strong&gt; Function-space multipliers lead further to adjoint variables in optimal control. They share a variational viewpoint, with the relevant object spaces and constraints specified in each case.&lt;/p&gt;

&lt;h2 id=&quot;8-galerkin-connects-function-space-conditions-to-coefficient-gradients&quot;&gt;8. Galerkin connects function-space conditions to coefficient gradients&lt;/h2&gt;

&lt;p&gt;Choose a finite-dimensional subspace of the perturbation space,&lt;/p&gt;

\[V_n=\operatorname{span}\{\phi_1,\ldots,\phi_n\}\subset V.\]

&lt;p&gt;For the admissible set \(\mathcal A=x_b+V\), write&lt;/p&gt;

\[x_n(t)=x_b(t)+\sum_{j=1}^n c_j\phi_j(t).\]

&lt;p&gt;In a fixed-endpoint problem, \(x_b\) carries the prescribed endpoint values, and each \(\phi_j\) vanishes at both endpoints. Varying the coefficients therefore preserves the boundary conditions.&lt;/p&gt;

&lt;p&gt;Define the finite-dimensional objective&lt;/p&gt;

\[F_n(c)=\mathcal J\!\left[x_b+\sum_{j=1}^n c_j\phi_j\right].\]

&lt;p&gt;The chain rule gives&lt;/p&gt;

\[\boxed{
\frac{\partial F_n}{\partial c_i}
=D\mathcal J[x_n][\phi_i].
}\]

&lt;p&gt;Because the derivative is linear in the perturbation and the basis spans \(V_n\),&lt;/p&gt;

\[\begin{aligned}
\nabla_c F_n(c)=0
&amp;amp;\Longleftrightarrow
D\mathcal J[x_n][\phi_i]=0,\quad i=1,\ldots,n
\\
&amp;amp;\Longleftrightarrow
D\mathcal J[x_n][\eta_n]=0,\quad \forall\eta_n\in V_n.
\end{aligned}\]

&lt;p&gt;This is the Galerkin stationarity condition for the variational problem. The residual first-order action vanishes on the chosen perturbation subspace. The equivalence is exact for each fixed \(V_n\); convergence of discrete solutions as the space is refined requires additional analysis.&lt;/p&gt;

&lt;h3 id=&quot;coefficient-gradients-still-depend-on-the-inner-product&quot;&gt;Coefficient gradients still depend on the inner product&lt;/h3&gt;

&lt;p&gt;Equivalent stationary conditions do not imply that the Euclidean coefficient gradient equals the expansion coefficients of a function-space gradient.&lt;/p&gt;

&lt;p&gt;Define the \(L^2\) gradient \(g_n\) on \(V_n\) by&lt;/p&gt;

\[D\mathcal J[x_n][\eta_n]
=\langle g_n,\eta_n\rangle_{L^2},
\qquad
g_n=\sum_{j=1}^n a_j\phi_j.\]

&lt;p&gt;Let&lt;/p&gt;

\[M_{ij}=\langle\phi_j,\phi_i\rangle_{L^2}.\]

&lt;p&gt;Then&lt;/p&gt;

\[(\nabla_c F_n)_i
=\sum_j M_{ij}a_j,
\qquad
\boxed{a=M^{-1}\nabla_c F_n.}\]

&lt;p&gt;The matrix \(M\) is the Gram matrix of the basis, commonly called the mass matrix in finite elements. It equals the identity only when the basis is orthonormal under the chosen inner product. This explains how one stationary problem can produce different gradient descent directions.&lt;/p&gt;

&lt;h2 id=&quot;9-why-this-common-viewpoint-is-useful&quot;&gt;9. Why this common viewpoint is useful&lt;/h2&gt;

&lt;p&gt;First, the Euler–Lagrange equation becomes something we can derive rather than memorize in isolation. Calculate the first variation and handle the boundary terms. The same procedure extends to higher derivatives and multiple fields.&lt;/p&gt;

&lt;p&gt;Second, the connection between weak formulations and numerical methods becomes natural. The first variation initially acts on admissible test functions. Restricting the test space to finitely many basis functions yields a coefficient problem. Finite elements and variational spectral methods often follow this path.&lt;/p&gt;

&lt;p&gt;Finally, derivatives, gradients, and multipliers have distinct roles: the derivative describes the objective’s first-order response to perturbations, an inner product represents that response as a gradient, and multipliers incorporate constraints into the first-order system.&lt;/p&gt;

&lt;h2 id=&quot;10-a-dictionary-between-the-two-settings&quot;&gt;10. A dictionary between the two settings&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Structure&lt;/th&gt;
      &lt;th&gt;Finite-dimensional optimization&lt;/th&gt;
      &lt;th&gt;Function-space variations&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Candidate&lt;/td&gt;
      &lt;td&gt;\(x\in\mathbb R^n\)&lt;/td&gt;
      &lt;td&gt;An entire function \(x(\cdot)\in\mathcal A\)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Objective&lt;/td&gt;
      &lt;td&gt;\(f(x)\in\mathbb R\)&lt;/td&gt;
      &lt;td&gt;\(\mathcal J[x]\in\mathbb R\)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Perturbation&lt;/td&gt;
      &lt;td&gt;\(h\in\mathbb R^n\)&lt;/td&gt;
      &lt;td&gt;\(\eta\in V\)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;First-order change&lt;/td&gt;
      &lt;td&gt;\(Df(x)[h]\)&lt;/td&gt;
      &lt;td&gt;\(D\mathcal J[x][\eta]\)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Stationarity&lt;/td&gt;
      &lt;td&gt;\(Df(x)[h]=0\) for every \(h\)&lt;/td&gt;
      &lt;td&gt;\(D\mathcal J[x][\eta]=0\) for every \(\eta\)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Inner-product representation&lt;/td&gt;
      &lt;td&gt;Euclidean gradient \(\nabla f\)&lt;/td&gt;
      &lt;td&gt;A function-space gradient under the chosen inner product&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Integral problems&lt;/td&gt;
      &lt;td&gt;Equations in finitely many variables&lt;/td&gt;
      &lt;td&gt;A weak form; Euler–Lagrange equations under sufficient smoothness&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Constraints&lt;/td&gt;
      &lt;td&gt;KKT multiplier system&lt;/td&gt;
      &lt;td&gt;Function-space multipliers and adjoint conditions&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Finite-dimensional approximation&lt;/td&gt;
      &lt;td&gt;A coefficient vector \(c\)&lt;/td&gt;
      &lt;td&gt;\(x_n=x_b+\sum_i c_i\phi_i\)&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;The guiding order is: &lt;strong&gt;identify the optimization object, identify admissible perturbations, then calculate the first-order change.&lt;/strong&gt; Zero gradients, Euler–Lagrange equations, KKT conditions, and Galerkin discretization address different parts of this common construction.&lt;/p&gt;

&lt;h2 id=&quot;further-reading&quot;&gt;Further reading&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Gilbert Strang, &lt;a href=&quot;https://ocw.mit.edu/courses/18-086-mathematical-methods-for-engineers-ii-spring-2006/e94c05947ed036cd6ad0150102087062_am72.pdf&quot;&gt;Calculus of Variations, Section 7.2&lt;/a&gt;, for first variations and weak and strong forms.&lt;/li&gt;
  &lt;li&gt;Stephen Boyd and Lieven Vandenberghe, &lt;a href=&quot;https://web.stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf&quot;&gt;Convex Optimization, Section 5.5.3&lt;/a&gt;, for KKT conditions and their context.&lt;/li&gt;
  &lt;li&gt;Lawrence C. Evans, &lt;a href=&quot;https://math.berkeley.edu/~evans/control.course.pdf&quot;&gt;An Introduction to Mathematical Optimal Control Theory, Chapter 4&lt;/a&gt;, for adjoints, the Pontryagin principle, and transversality conditions. Hamiltonian sign conventions differ across references.&lt;/li&gt;
&lt;/ul&gt;
</description></item><item><title>Keeping textbooks, questions, and learning materials together</title><link>https://conanxu-math.github.io/en/blog/course-copilot/</link><guid>https://conanxu-math.github.io/en/blog/course-copilot/</guid><pubDate>Tue, 13 Oct 2026 00:00:00 +0800</pubDate><description>&lt;p&gt;Reading a textbook that requires careful reasoning naturally leads to many side questions. What does this concept mean? How is a condition from the previous chapter being used? Is there a concrete example? Where should an insight be recorded once it becomes clear?&lt;/p&gt;

&lt;p&gt;VeryMath Course Copilot brings these activities into one workspace: the textbook stays visible while questions and learning materials remain connected to what is being read.&lt;/p&gt;

&lt;h2 id=&quot;start-with-a-textbook-then-a-conversation&quot;&gt;Start with a textbook, then a conversation&lt;/h2&gt;

&lt;p&gt;The project is designed for personal deployment. Users import their own textbook PDFs, read them in a browser, and connect a coding agent they already use.&lt;/p&gt;

&lt;p&gt;The textbook provides the structure. A task can refer to the current page, a selected passage, a chapter, or the whole book, giving explanations and notes a concrete context.&lt;/p&gt;

&lt;p&gt;Compared with repeatedly copying fragments into separate conversations, this arrangement offers a more continuous starting point for study.&lt;/p&gt;

&lt;h2 id=&quot;several-kinds-of-learning-in-one-workspace&quot;&gt;Several kinds of learning in one workspace&lt;/h2&gt;

&lt;p&gt;According to the public project documentation, the workspace supports explanations, exercises, mind maps, knowledge graphs, and LaTeX slides based on the textbook.&lt;/p&gt;

&lt;p&gt;These serve different purposes:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Explanations&lt;/strong&gt; unpack the important steps in concepts, theorems, and examples.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Exercises&lt;/strong&gt; turn a feeling of understanding into an actual attempt.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Mind maps and knowledge graphs&lt;/strong&gt; help review chapter structure and relationships between concepts.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Slides and notes&lt;/strong&gt; organize an understanding into material that can be revisited.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The connected agent performs the teaching tasks. Results depend on the deployment, chosen model, and available tools. Generated formulas, derivations, and important numbers still need to be checked against the original text.&lt;/p&gt;

&lt;h2 id=&quot;materials-stay-in-a-personal-workspace&quot;&gt;Materials stay in a personal workspace&lt;/h2&gt;

&lt;p&gt;Textbooks, reading positions, conversations, and generated materials are saved in local course directories. Supplementary notes, exercise solutions, and references can be stored with the corresponding course for later use.&lt;/p&gt;

&lt;p&gt;Local storage and model processing are separate considerations. Local storage describes where course materials are kept. When a remote agent is used, the content sent to that service depends on the user’s selected agent and request.&lt;/p&gt;

&lt;p&gt;The workspace also requires a local service to connect to the agent. Uploading a static web page alone is not enough to run the complete application.&lt;/p&gt;

&lt;h2 id=&quot;keep-the-tool-centered-on-a-real-question&quot;&gt;Keep the tool centered on a real question&lt;/h2&gt;

&lt;p&gt;A useful study tool does more than offer buttons. It should help the learner stay with the question at hand.&lt;/p&gt;

&lt;p&gt;Where the reading stopped, what was cited, and which chapter a generated note belongs to all affect whether a single question can become part of an ongoing learning process. VeryMath uses the textbook and course directory to connect these activities.&lt;/p&gt;

&lt;h2 id=&quot;further-reading&quot;&gt;Further reading&lt;/h2&gt;

&lt;p&gt;This article is an introduction based on the public README.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/ConanXu-math/course-copilot&quot;&gt;VeryMath Course Copilot repository&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/ConanXu-math/course-copilot/blob/main/docs/user-guide.md&quot;&gt;Installation and user guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before getting started, read the installation instructions and choose an agent you are already comfortable using.&lt;/p&gt;
</description></item><item><title>When an iteration comes full circle: counterexamples for three-block ADMM</title><link>https://conanxu-math.github.io/en/blog/admm-counterexample/</link><guid>https://conanxu-math.github.io/en/blog/admm-counterexample/</guid><pubDate>Tue, 13 Oct 2026 00:00:00 +0800</pubDate><description>&lt;p&gt;Some failures of iterative algorithms are easy to recognize: values grow larger and eventually overflow. Another kind is less obvious. The iterates stay in a bounded region and repeatedly visit the same states, yet never approach a solution.&lt;/p&gt;

&lt;p&gt;This three-block ADMM project studies the latter situation.&lt;/p&gt;

&lt;h2 id=&quot;where-the-question-begins&quot;&gt;Where the question begins&lt;/h2&gt;

&lt;p&gt;ADMM splits an optimization problem into parts and updates them in turn. Using more blocks can make individual steps easier to compute, but it also changes the behavior of the complete iteration. A natural extension need not inherit the convergence guarantees of the original method.&lt;/p&gt;

&lt;p&gt;The particular question here is whether an identity matrix in the third constraint block is enough to guarantee convergence of unmodified direct three-block ADMM.&lt;/p&gt;

&lt;p&gt;The public repository gives two fixed convex quadratic programs. Both have a unique KKT point, yet direct three-block ADMM can produce bounded, non-KKT periodic orbits. The identity structure of the third block alone therefore does not rule out this failure.&lt;/p&gt;

&lt;h2 id=&quot;two-periods-two-different-statements&quot;&gt;Two periods, two different statements&lt;/h2&gt;

&lt;p&gt;The first instance has an orbit with minimal period &lt;strong&gt;66&lt;/strong&gt;. Starting from a specified initial state, the iteration returns exactly to that state after 66 steps and repeats.&lt;/p&gt;

&lt;p&gt;The second instance has minimal period &lt;strong&gt;23&lt;/strong&gt;. In addition to establishing the periodic orbit, the project gives a local attraction result: initial states in an open invariant set of the appropriate reduced state space converge to the non-KKT orbit phase by phase.&lt;/p&gt;

&lt;p&gt;These statements answer different questions. The first concerns one deliberately chosen initialization. The second describes the behavior of a neighborhood for one fixed problem. Neither should be extended to all initializations or all problem data.&lt;/p&gt;

&lt;h2 id=&quot;from-an-apparent-cycle-to-exact-verification&quot;&gt;From an apparent cycle to exact verification&lt;/h2&gt;

&lt;p&gt;Numerical experiments can help locate a candidate orbit. But states that appear to coincide in finite precision are not, by themselves, an exact proof of periodicity.&lt;/p&gt;

&lt;p&gt;Turning the observation into a precise result requires answering several questions:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Does every step follow the original algorithm?&lt;/li&gt;
  &lt;li&gt;Are all conditions for the projection or branch choices satisfied?&lt;/li&gt;
  &lt;li&gt;Does the state return exactly to its starting point after a full period?&lt;/li&gt;
  &lt;li&gt;Could the period be shorter?&lt;/li&gt;
  &lt;li&gt;Why are the states on the orbit not KKT points?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The project provides exact, recomputable verification materials for these questions. The period-66 instance also has cross-checks using different implementations. The period-23 instance uses rational data and includes verification of a local invariant set.&lt;/p&gt;

&lt;h2 id=&quot;what-comes-after-ai-assisted-discovery&quot;&gt;What comes after AI-assisted discovery&lt;/h2&gt;

&lt;p&gt;The repository also documents AI-assisted searches for the counterexamples. One useful distinction runs throughout this process: finding a candidate, explaining a phenomenon, and verifying a conclusion are connected but different activities.&lt;/p&gt;

&lt;p&gt;Computation can point toward promising directions. Mathematical analysis must then identify the conditions under which a statement holds. A clear research record should help readers distinguish exploratory work from established conclusions.&lt;/p&gt;

&lt;p&gt;For this problem, the main result is a concrete counterexample that can be stated precisely and checked step by step, beyond a plot that merely appears not to converge.&lt;/p&gt;

&lt;h2 id=&quot;further-reading&quot;&gt;Further reading&lt;/h2&gt;

&lt;p&gt;This article is an introduction based on the public repository and does not present a new proof.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/ConanXu-math/identity-slack-admm-cycle-certificate&quot;&gt;Project repository and verification instructions&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://arxiv.org/abs/2608.14396&quot;&gt;Accompanying paper: arXiv:2608.14396&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A useful starting point is the repository’s statement of scope, followed by either the mathematical argument or the verification code.&lt;/p&gt;
</description></item>
</channel></rss>
