Skip to content

Instantly share code, notes, and snippets.

@tarawa
Last active August 29, 2015 13:57
Show Gist options
  • Save tarawa/9724477 to your computer and use it in GitHub Desktop.
Save tarawa/9724477 to your computer and use it in GitHub Desktop.
sol
f(0)=0
f(1)=1/3+(2a+1)/2+(a^2+a)
=a^2+2a+5/6
f(a)=a^3/3-(2a+1)a^2/2+(a^2+a)a
=a^3/3+a^2/2, a =[0,1]
f'(a)=a^2+a, max : a=1, maxval=5/6
f(a+1) = (a+1)^3/3-1/2(2a+1)(a+1)^2+(a^2+a)(a+1)
=a^3/3+a^2/2-1/6,a = (-1,0]
f'(a+1)=a^2+a, 值恒小于0,由于f(0)的存在舍去
分情况讨论四者取个max就可以了。。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment