# Calculus of variations question

**URL:** <https://boards.straightdope.com/t/calculus-of-variations-question/614381>\
**Category:** Factual Questions\
**Created:** [February 29, 2012, 7:36pm UTC](https://boards.straightdope.com/t/calculus-of-variations-question/614381 "2012-02-29T19:36:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snarky\_Kong](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Snarky\_Kong](https://boards.straightdope.com/u/Snarky_Kong)\
**Post date:** [February 29, 2012, 7:36pm UTC](https://boards.straightdope.com/t/calculus-of-variations-question/614381/1 "2012-02-29T19:36:54Z")

</div>

I’m reading a structural mechanics book and it’s going over boundary value problems and needs to develop the calculus of variations for this purpose. So, it states:

Define G(g,a,b,u)= integral from 0 to l of g(x)u(x)dx +a_u(0)+b_u(l)

If G(g,a,b,y)=0 for all u(x), then g(x)=0, a=b=0

It starts the proof of the previous statement considering the subset of functions u for which u(0)=u(l)=0. Then the integral of g(x)u(x) must equal zero. If you let u(x)=g(x) (since the theorem must hold for all u), then the integral of g^2dx=0 only holds for g(x)=0.

I follow this. However, the next part relaxes the assumption that u(l)=0. The book then states “since we have already proved that g(x)=0, we have a\*u(0)=0…” But didn’t we only prove that g(x)=0 when u(0)=u(l)=0? Why can we say that g(x)=0 when we relax that restriction?

---

<div class="post-metadata">

**Author:** ![Omphaloskeptic](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@Omphaloskeptic](https://boards.straightdope.com/u/Omphaloskeptic)\
**Post date:** [February 29, 2012, 8:17pm UTC](https://boards.straightdope.com/t/calculus-of-variations-question/614381/2 "2012-02-29T20:17:54Z")

</div>

It’s not actually _relaxing_ a restriction; it’s relaxing a restriction on the assumptions, which actually makes the assumptions _stronger_.

Think of it as two statements to be proved. The first is

“If G(g,a,b,u)=0 for all u(x) such that u(0)=u(l)=0, then g(x)=0.”

and you proved this by taking u=g (here you must use the assumption that g(0)=g(l)=0, which you didn’t give explicitly, so that g is an allowed value of u). The second statement is

“If G(g,a,b,u)=0 for all u(x), then g(x)=0 and a=b=0.”

This is a stronger assumption than in the first statement–the set of u for which we require G=0 in this second statement is strictly larger, since it now includes functions with nonzero endpoints. In particular, we’ve already proved that g=0 using the smaller set of u for which u(0)=u(l)=0, so we still must have g=0. Thus G(g,a,b,u)=a_u(0)+b_u(l).

---

<div class="post-metadata">

**Author:** ![Snarky\_Kong](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Snarky\_Kong](https://boards.straightdope.com/u/Snarky_Kong)\
**Post date:** [February 29, 2012, 9:14pm UTC](https://boards.straightdope.com/t/calculus-of-variations-question/614381/3 "2012-02-29T21:14:44Z")

</div>

> [@Omphaloskeptic](#):
>
> In particular, we’ve already proved that g=0 using the smaller set of u for which u(0)=u(l)=0, so we still must have g=0.

This is the part I don’t understand.

Why do we have g=0 for any u other than a u that is equal to zero at the end points? It sounds to me like the book is saying “A+Bx=0. Assume X is zero, therefore proving A is zero. Ok, relax that assumption. Now we already have A is zero, so the equation is Bx=0, so B also has to be zero.”

---

<div class="post-metadata">

**Author:** ![Jas09](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@Jas09](https://boards.straightdope.com/u/Jas09)\
**Post date:** [February 29, 2012, 9:52pm UTC](https://boards.straightdope.com/t/calculus-of-variations-question/614381/4 "2012-02-29T21:52:53Z")

</div>

The first part deals with a subset of u(x) - specifically those that meet u(0) = u(l) = 0. For G(g,a,b,y)=0 to hold, we require that g(x) be zero.

Then, we remove the restriction on u(x). We still have g(x) = 0, because this generalized u(x) still includes those functions for which u(0) = u(l) = 0. However it also includes functions for which u(0) and u(l) are not zero - therefore we require a=b=0.

Your example isn’t equivalent because x isn’t a function. A better one would be:

Consider A\* g(x) + B \* g(0) = 0 for any function g(x). First, consider that some g(x) will have g(0) = 0. Therefore, A must be 0 for the equation to hold for these g(x). Now, since A is zero, consider g(x) for which g(0) =/= 0. Now we can show that B must also be zero for the equation to hold for all g(x).

---

<div class="post-metadata">

**Author:** ![Jas09](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@Jas09](https://boards.straightdope.com/u/Jas09)\
**Post date:** [February 29, 2012, 9:54pm UTC](https://boards.straightdope.com/t/calculus-of-variations-question/614381/5 "2012-02-29T21:54:47Z")

</div>

Actually, your example holds as well if you want it to be true for all possible values of x. Right?

The only equation of the form A + Bx = 0 that is true for all values of x is 0 + 0 \* x = 0.

And the proof is exactly as you describe. First consider x = 0. This immediately leads to A = 0. Now consider non-zero values of x. Since A is zero this requires B = 0.

---

<div class="post-metadata">

**Author:** ![Omphaloskeptic](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@Omphaloskeptic](https://boards.straightdope.com/u/Omphaloskeptic)\
**Post date:** [February 29, 2012, 9:55pm UTC](https://boards.straightdope.com/t/calculus-of-variations-question/614381/6 "2012-02-29T21:55:08Z")

</div>

> [@Snarky\_Kong](#):
>
> This is the part I don’t understand.
> 
> Why do we have g=0 for any u other than a u that is equal to zero at the end points?

g is an unknown but _fixed_ function, which you are trying to find (along with a and b). Using u=g lets you show that g=0.

> [@](#):
>
> It sounds to me like the book is saying “A+Bx=0. Assume X is zero, therefore proving A is zero. Ok, relax that assumption. Now we already have A is zero, so the equation is Bx=0, so B also has to be zero.”

This is a reasonable analogy, but you’re thinking about it wrong. Let’s make it precise. The statement is

“Suppose A+Bx=0 for all x. Prove that A=B=0.”

(again, A and B are unknown but fixed values, to be found), and your proof can be,

Since A+Bx=0 for all x, in particular it is true for x=0: A=A+B_0=0. So A=0. And it is also true for x=1: A+B=A+B_1=0. But we already know that A=0, so also B=0.

Note that you’re not _assuming_ that x=0 in the first sentence of your proof. You are told that the statement A+Bx=0 is true for all x; you’re just using one of the values for which the statement is true, to derive some conditions on the variables. If you like you can consider the statement “A+Bx=0 for all x” to be an infinite set of statements:  
A+B_0=0  
A+B_1=0  
A+B_2.5=0  
A+B_3.14159=0  
…  
and your goal is just to use all of these equations to find A and B.

Similarly in your problem you have been given a bunch of statements:  
G(g(x),a,b,1)=0  
G(g(x),a,b,x)=0  
G(g(x),a,b,g(x))=0  
… (and so on, with every legal value of u inserted) …  
Your goal is to find g(x), a, and b. You can use the third statement to show g(x)=0; then you can use other statements to find a and b.

---

<div class="post-metadata">

**Author:** ![Snarky\_Kong](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Snarky\_Kong](https://boards.straightdope.com/u/Snarky_Kong)\
**Post date:** [March 1, 2012, 12:43am UTC](https://boards.straightdope.com/t/calculus-of-variations-question/614381/7 "2012-03-01T00:43:34Z")

</div>

Ok, I understand now. I wasn’t getting that g was fixed. Thanks both of you.
