solve

This is a discussion on solve within the General Discussions forums, part of the Community Boards category; Given: a,b,c,d and T find (x,y) such that ax+by=T and cx+dy is maximum ! this can be easily solved using ...

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    71

    solve

    Given:
    a,b,c,d and T

    find (x,y) such that ax+by=T and cx+dy is maximum !

    this can be easily solved using Extended Euclid algorithm.But is there any simpler way using calculus ??

    Thank you

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    The math forum is that way: ----->


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,248
    Quote Originally Posted by jack_carver View Post
    Given:
    a,b,c,d and T

    find (x,y) such that ax+by=T and cx+dy is maximum !

    this can be easily solved using Extended Euclid algorithm.But is there any simpler way using calculus ??

    Thank you
    Using calculus, there are two ways to solve it:

    1. Direct solution. Solve the constraint equation for y. Substitute this into the second equation to get an equation only in x. Take the derivative, set it equal to zero, solve for x. Now back-substitute the value of x into the constraint equation and solve for y.

    2. Lagrange multipliers. Check Wikipedia.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. can anyone solve this for me? (look inside)
    By johnsonswww in forum C Programming
    Replies: 10
    Last Post: 03-02-2009, 10:24 AM
  2. Replies: 2
    Last Post: 04-25-2005, 11:59 AM
  3. help solve linking problem, thanks
    By Raison in forum Windows Programming
    Replies: 8
    Last Post: 05-29-2004, 11:14 AM
  4. please help me to solve the error
    By Jasonymk in forum C++ Programming
    Replies: 8
    Last Post: 05-02-2003, 09:08 AM
  5. Help to solve this problem
    By Romashka in forum C++ Programming
    Replies: 3
    Last Post: 04-16-2002, 09:32 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21