0
$\begingroup$

I have:
a triangle $ABC$
A linear function $f_0(X)$ where:
$f_0(A + s(B-A) + t(C-A)) = 1-s-t$
$s,t \in \mathbb{R}$

Can I express $\nabla f_0(x)$ as a linear combination of $A,B,C$?


I noticed that I can calculate the gradient by solving the system
$\nabla f_0(x) \cdot (B-A) = -1$
$\nabla f_0(x) \cdot (C-A) = -1$

.. but I'd like to avoid such a solution, as I was looking for something more immediate

Thanks.

  • 0
    What's a hat function? Why does it appear in the title but not in the body? The problem in the body appears to be drastically underdetermined -- are you making additional assumptions about $f_0$?2012-11-27
  • 0
    a) That's a function of one variable; here you seem to have a function of (at least) two variables? b) What about the rest of my questions?2012-11-27
  • 0
    The equations you've added determine $f_0$ on two edges of the triangle; you still haven't expressed any assumptions on $f_0$ that would allow to calculate its gradient in general. I'm getting the impression that what you actually mean is that $f_0$ is a linear function, but the question doesn't say that.2012-11-27
  • 0
    It seems rather audacious to omit the most important property of your function and hope that people will infer it from a term in the title that's apparently only defined for one-dimensional functions, and which apparently doesn't even refer to linear functions in that case. Generally speaking, the body of the question should be self-contained and shouldn't rely on assumptions implicit in the title.2012-11-27
  • 0
    By the way, now your first two equations are redundant since they're special cases of the third.2012-11-27
  • 0
    Excellent criticism on my (admittedly bad) formulation of the question :) I hope it can be answered as well2012-11-27

1 Answers 1

0

Let $a=B-C$, $b=C-A$ and $c=A-B$. Then the solution to

$$ \begin{align} x\cdot c&=+1\;,\\ x\cdot b&=-1 \end{align} $$

is

$$ x=\frac{a\times(b\times c)}{|b\times c|^2}=\frac{b(a\cdot c)-c(a\cdot b)}{(b\cdot b)(c\cdot c)-(b\cdot c)^2}\;. $$

  • 0
    Thanks for the answer, it's much better than my linear system solution, one question though: Is the final expression for $x$ considered a linear combination? (probably not)2012-11-27
  • 0
    @Babis: It's not better than your linear system solution; it's just an elegant way of writing down the solution to your linear system. Yes, it's a linear combination of the vertices, but the coefficients of the linear combination depend on the vertices, so it's not a linear function of the vertices -- which wasn't to be expected, since the magnitude of the gradient is inversely proportional to the side lenghts (which is reflected in the fact that the nominator has units of length to the third and the denominator has units of length to the fourth).2012-11-27
  • 0
    Ok, I think this covers it then now, thanks again for the solution and the explanation!2012-11-27
  • 0
    @Babis: You're welcome!2012-11-27
  • 0
    If I may, one more related question: If the function was $f(A+s(B−A)+t(C−A))= a−sb−tc$, how would the 'elegant form' of the solution be? I would try to derive it myself, but it is unclear to me how $x \cdot c = +1$, $x \cdot b = -1$ evolves to the expression with the cross products. Do you have any links for the derivation instead, or do you know how could I search it on the internet somehow?2012-11-28
  • 0
    @Babis: That's slightly confusing -- it seems that in that function $a$, $b$ and $c$ are real numbers, unrelated to the vectors that I introduced and that you yourself use in the next sentence? If so, let's write $f=u-sv-tw$ instead to keep things clear. Then you get analogous equations $x\cdot c=+v$ and $x\cdot b=-w$, and you can absorb $v$ and $w$ into $c$ and $b$ respectively, $x\cdot(c/v)=+1$ and $x\cdot(b/w)=-1$, and then apply the solution in my answer using $c'=c/v$, $b'=b/w$ and $a'=-(b'+c')$.2012-11-28
  • 0
    You guessed correctly, sorry for the confusion. Is there any named rule that does the ... 'magic' of converting the 2 dot product equations to the single expression below?2012-11-28
  • 0
    Also, $u$ doesn't seem to have any effect in the above alteration..2012-11-28