Skip to main content
Added Manipulate
Source Link
Bob Hanlon
  • 167.4k
  • 7
  • 83
  • 213
function = (k*f)*f + 3 f + (1 - f) k (1 + f) t // Simplify; 

To find the function's maximum use Maximize

Maximize[function, f] 

enter image description here

For the function to be bounded requires that (t > 1 && k > 0) || (t < 1 && k < 0)

{max, arg} = Assuming[(t > 1 && k > 0) || (t < 1 && k < 0), Maximize[function, f] // Simplify] (* {9/(4 k (-1 + t)) + k t, {f -> 3/(2 k (-1 + t))}} *) max == function /. arg // Simplify (* True *) 

EDIT Graphically,

Manipulate[ Module[{ cond = (tt > 1 && kk > 0) || (tt < 1 && kk < 0), maxPt = If[tt == 1 || kk == 0, {}, {3/(2*kk*(-1 + tt)), 9/(4*kk*(-1 + tt)) + kk*tt}]}, Plot[function /. {k -> kk, t -> tt}, {f, -5, 5}, PlotStyle -> If[cond, Blue, Directive[Red, Dashed]], Epilog -> {If[cond, {Text[Style["max", Red, Bold], maxPt, {0, 2}], Red, AbsolutePointSize[4], Point[maxPt]}, Nothing]}]], {{kk, -2, k}, -3, 5, .1, Appearance -> "Labeled"}, {{tt, 0, t}, -5, 5, .1, Appearance -> "Labeled"}] 

enter image description here

function = (k*f)*f + 3 f + (1 - f) k (1 + f) t // Simplify; 

To find the function's maximum use Maximize

Maximize[function, f] 

enter image description here

For the function to be bounded requires that (t > 1 && k > 0) || (t < 1 && k < 0)

{max, arg} = Assuming[(t > 1 && k > 0) || (t < 1 && k < 0), Maximize[function, f] // Simplify] (* {9/(4 k (-1 + t)) + k t, {f -> 3/(2 k (-1 + t))}} *) max == function /. arg // Simplify (* True *) 
function = (k*f)*f + 3 f + (1 - f) k (1 + f) t // Simplify; 

To find the function's maximum use Maximize

Maximize[function, f] 

enter image description here

For the function to be bounded requires that (t > 1 && k > 0) || (t < 1 && k < 0)

{max, arg} = Assuming[(t > 1 && k > 0) || (t < 1 && k < 0), Maximize[function, f] // Simplify] (* {9/(4 k (-1 + t)) + k t, {f -> 3/(2 k (-1 + t))}} *) max == function /. arg // Simplify (* True *) 

EDIT Graphically,

Manipulate[ Module[{ cond = (tt > 1 && kk > 0) || (tt < 1 && kk < 0), maxPt = If[tt == 1 || kk == 0, {}, {3/(2*kk*(-1 + tt)), 9/(4*kk*(-1 + tt)) + kk*tt}]}, Plot[function /. {k -> kk, t -> tt}, {f, -5, 5}, PlotStyle -> If[cond, Blue, Directive[Red, Dashed]], Epilog -> {If[cond, {Text[Style["max", Red, Bold], maxPt, {0, 2}], Red, AbsolutePointSize[4], Point[maxPt]}, Nothing]}]], {{kk, -2, k}, -3, 5, .1, Appearance -> "Labeled"}, {{tt, 0, t}, -5, 5, .1, Appearance -> "Labeled"}] 

enter image description here

Source Link
Bob Hanlon
  • 167.4k
  • 7
  • 83
  • 213

function = (k*f)*f + 3 f + (1 - f) k (1 + f) t // Simplify; 

To find the function's maximum use Maximize

Maximize[function, f] 

enter image description here

For the function to be bounded requires that (t > 1 && k > 0) || (t < 1 && k < 0)

{max, arg} = Assuming[(t > 1 && k > 0) || (t < 1 && k < 0), Maximize[function, f] // Simplify] (* {9/(4 k (-1 + t)) + k t, {f -> 3/(2 k (-1 + t))}} *) max == function /. arg // Simplify (* True *)