Question 1131207
<pre>
{{{2a*sin^2(C/2)  +2c*sin^2(A/2)=a-b+c}}}

First we draw a general triangle ABC with the usual notations,
with altitude h to base b, dividing b into two parts x and y, 
such that x+y = b.

{{{drawing(400,200,-.5,3.5,-.5,2,
green(line(1,0,1,1.5)),locate(.5,0,x),locate(2,0,y),
locate(0,0,A), locate(1.05,.8,h),
red(line(0,-.3,3,-.3)), locate(1.5,-.3,b),
locate(3,0,C),locate(.95,1.7,B),locate(.35,.84,c),locate(2.1,.84,a),
triangle(0,0,3,0,1,1.5) )}}}

[Note that we can always choose the lettering so that the altitude h
is inside the triangle, so that x+y=b.  We can also similarly prove
the proposition when h is outside the triangle. It will only involve
changing some signs.]

We start with the left side:

{{{2a*sin^2(C/2)  +2c*sin^2(A/2)}}}

Use the half angle formula to substitute for the sines:

{{{sin(theta/2)= "" +- sqrt((1-cos(theta))/2)}}}

{{{2a*("" +- sqrt((1-cos(C))/2))^2  +2c*("" +- sqrt((1-cos(A))/2))^2}}}

Squaring square roots takes them both away:

{{{2a*((1-cos(C))/2)  +2c*((1-cos(A))/2))}}}

Cancel the 2's

{{{a*(1^""-cos(C))  +c*(1^""-cos(A))}}}

{{{a-a*cos(C)  +c-c*cos(A))}}}

Now go back to the triangle up there. From it, we have
{{{matrix(1,3,cos(C)=y/a,and,cos(A)=x/c)}}} and substitute
the fractions for the cosines:

{{{a-a*(y/a)  +c-c*(x/c))}}}

Cancel the a's in the second term and the c's in the last term:

{{{a-y  +c-x}}}

Rearrange the terms:

{{{a-x-y+c}}}

Take " - " sign out of the two middle terms:

{{{a-(x+y)+c}}}

And since from the triangle x+y = b, we have
the right side of what was given:

{{{a-b+c}}}

Edwin</pre>