- #1

benorin

Homework Helper

- 1,389

- 144

## Homework Statement

maximize f(a,d,h,p)= (4a+3d+3h+c1)c2 *(2+0.01*floor(50+0.0001p)) subject to the constraint 1439a+427d+9259+912/5*h=k.

This is not a hw problem but it may as well be: it comes from a game, the function f represents damage as a function of 4 stats and the constraint arises since the cost of adding each stat is weighted in terms of skill points=k.

## Homework Equations

Lagrange multipliers: del(f)=lambda*del(g) and g=k, form a system of equations whose solutions are possible extrema of f.

## The Attempt at a Solution

<4c2*(2+0.01floor(50+0.0001p)), 3c2*(2+0.01floor(50+0.0001p)), 3c2*(2+0.01floor(50+0.0001p)),0> = lambda*<1439,427,912/5,925> and g=k. The fourth vector component forces lambda=0 and this is inconsistent because c2 is a non-zero constant. Not really sure where that leaves me. Just a pointer will do, no lengthy solutions please. Thanks for your time.