Skip to main content
added 62 characters in body
Source Link
Bob Hanlon
  • 162.6k
  • 7
  • 81
  • 205

I am trying to solve this equation

The link has a screen capture of the equation and the solution. I am looking for the values of a1 and a2 in particular, but they need to be real numbers. s1 and s2 are integers. Now if I remove the condition of integers, then (as expected) the computation takes too long (it hadn't finished for an hour). My questions are:

  1. Is it possible to define a1 and a2 to be reals, and s1 and s2 to be integers?

  2. I would like to reduce the possible values of a1 and a2 to the tenth decimal point (i.e. between 0 and 1, it can have 0.1, 0.2, 0.3,...0.9). Can this be done in Mathematica?

Edit (The code for the equation):

Maximize[{3/100000 - ( Subscript[s, 1]*Subscript[a, 1] + Subscript[s, 2]*Subscript[a, 2])/(50000 Subscript[a, 1]) - ( 3 (Subscript[s, 1]*Subscript[a, 1] + Subscript[s, 2]*Subscript[a, 2]))/(25000 Subscript[a, 2]) + 1/( 400000000000 Subscript[a, 1] Subscript[a, 2]) + ( 3 (Subscript[s, 1]*Subscript[a, 1] + Subscript[s, 2]*Subscript[a, 2])^2)/( 100000 Subscript[a, 1] Subscript[a, 2]) + (9 Subscript[a, 1])/( 100000 Subscript[a, 2]), Subscript[a, 1] >= 1 && Subscript[a, 1] <= 5 && Subscript[a, 2] >= 1 && Subscript[a, 2] <= 5 && Subscript[s, 1] + Subscript[s, 2] == 10 && Subscript[s, 1] >= 0 && Subscript[s, 2] >= 0}, {Subscript[a, 1], Subscript[a, 2], Subscript[s, 1], Subscript[s, 2]}, Integers]

Maximize[{3/100000 - (
   Subscript[s, 1]*Subscript[a, 1] + 
    Subscript[s, 2]*Subscript[a, 2])/(50000 Subscript[a, 1]) - (
   3 (Subscript[s, 1]*Subscript[a, 1] + 
      Subscript[s, 2]*Subscript[a, 2]))/(25000 Subscript[a, 2]) + 1/(
   400000000000 Subscript[a, 1] Subscript[a, 2]) + (
   3 (Subscript[s, 1]*Subscript[a, 1] + 
      Subscript[s, 2]*Subscript[a, 2])^2)/(
   100000 Subscript[a, 1] Subscript[a, 2]) + (9 Subscript[a, 1])/(
   100000 Subscript[a, 2]), 
  Subscript[a, 1] >= 1 && Subscript[a, 1] <= 5 && 
   Subscript[a, 2] >= 1 && Subscript[a, 2] <= 5 && 
   Subscript[s, 1] + Subscript[s, 2] == 10 && Subscript[s, 1] >= 0 && 
   Subscript[s, 2] >= 0}, {Subscript[a, 1], Subscript[a, 2], 
  Subscript[s, 1], Subscript[s, 2]}, Integers]

I am trying to solve this equation

The link has a screen capture of the equation and the solution. I am looking for the values of a1 and a2 in particular, but they need to be real numbers. s1 and s2 are integers. Now if I remove the condition of integers, then (as expected) the computation takes too long (it hadn't finished for an hour). My questions are:

  1. Is it possible to define a1 and a2 to be reals, and s1 and s2 to be integers?

  2. I would like to reduce the possible values of a1 and a2 to the tenth decimal point (i.e. between 0 and 1, it can have 0.1, 0.2, 0.3,...0.9). Can this be done in Mathematica?

Edit (The code for the equation):

Maximize[{3/100000 - ( Subscript[s, 1]*Subscript[a, 1] + Subscript[s, 2]*Subscript[a, 2])/(50000 Subscript[a, 1]) - ( 3 (Subscript[s, 1]*Subscript[a, 1] + Subscript[s, 2]*Subscript[a, 2]))/(25000 Subscript[a, 2]) + 1/( 400000000000 Subscript[a, 1] Subscript[a, 2]) + ( 3 (Subscript[s, 1]*Subscript[a, 1] + Subscript[s, 2]*Subscript[a, 2])^2)/( 100000 Subscript[a, 1] Subscript[a, 2]) + (9 Subscript[a, 1])/( 100000 Subscript[a, 2]), Subscript[a, 1] >= 1 && Subscript[a, 1] <= 5 && Subscript[a, 2] >= 1 && Subscript[a, 2] <= 5 && Subscript[s, 1] + Subscript[s, 2] == 10 && Subscript[s, 1] >= 0 && Subscript[s, 2] >= 0}, {Subscript[a, 1], Subscript[a, 2], Subscript[s, 1], Subscript[s, 2]}, Integers]

I am trying to solve this equation

The link has a screen capture of the equation and the solution. I am looking for the values of a1 and a2 in particular, but they need to be real numbers. s1 and s2 are integers. Now if I remove the condition of integers, then (as expected) the computation takes too long (it hadn't finished for an hour). My questions are:

  1. Is it possible to define a1 and a2 to be reals, and s1 and s2 to be integers?

  2. I would like to reduce the possible values of a1 and a2 to the tenth decimal point (i.e. between 0 and 1, it can have 0.1, 0.2, 0.3,...0.9). Can this be done in Mathematica?

Edit (The code for the equation):

Maximize[{3/100000 - (
   Subscript[s, 1]*Subscript[a, 1] + 
    Subscript[s, 2]*Subscript[a, 2])/(50000 Subscript[a, 1]) - (
   3 (Subscript[s, 1]*Subscript[a, 1] + 
      Subscript[s, 2]*Subscript[a, 2]))/(25000 Subscript[a, 2]) + 1/(
   400000000000 Subscript[a, 1] Subscript[a, 2]) + (
   3 (Subscript[s, 1]*Subscript[a, 1] + 
      Subscript[s, 2]*Subscript[a, 2])^2)/(
   100000 Subscript[a, 1] Subscript[a, 2]) + (9 Subscript[a, 1])/(
   100000 Subscript[a, 2]), 
  Subscript[a, 1] >= 1 && Subscript[a, 1] <= 5 && 
   Subscript[a, 2] >= 1 && Subscript[a, 2] <= 5 && 
   Subscript[s, 1] + Subscript[s, 2] == 10 && Subscript[s, 1] >= 0 && 
   Subscript[s, 2] >= 0}, {Subscript[a, 1], Subscript[a, 2], 
  Subscript[s, 1], Subscript[s, 2]}, Integers]
added 809 characters in body
Source Link
p1988
  • 23
  • 3

I am trying to solve this equation

The link has a screen capture of the equation and the solution. I am looking for the values of a1 and a2 in particular, but they need to be real numbers. s1 and s2 are integers. Now if I remove the condition of integers, then (as expected) the computation takes too long (it hadn't finished for an hour). My questions are:

  1. Is it possible to define a1 and a2 to be reals, and s1 and s2 to be integers?

  2. I would like to reduce the possible values of a1 and a2 to the tenth decimal point (i.e. between 0 and 1, it can have 0.1, 0.2, 0.3,...0.9). Can this be done in Mathematica?

Edit (The code for the equation):

Maximize[{3/100000 - ( Subscript[s, 1]*Subscript[a, 1] + Subscript[s, 2]*Subscript[a, 2])/(50000 Subscript[a, 1]) - ( 3 (Subscript[s, 1]*Subscript[a, 1] + Subscript[s, 2]*Subscript[a, 2]))/(25000 Subscript[a, 2]) + 1/( 400000000000 Subscript[a, 1] Subscript[a, 2]) + ( 3 (Subscript[s, 1]*Subscript[a, 1] + Subscript[s, 2]*Subscript[a, 2])^2)/( 100000 Subscript[a, 1] Subscript[a, 2]) + (9 Subscript[a, 1])/( 100000 Subscript[a, 2]), Subscript[a, 1] >= 1 && Subscript[a, 1] <= 5 && Subscript[a, 2] >= 1 && Subscript[a, 2] <= 5 && Subscript[s, 1] + Subscript[s, 2] == 10 && Subscript[s, 1] >= 0 && Subscript[s, 2] >= 0}, {Subscript[a, 1], Subscript[a, 2], Subscript[s, 1], Subscript[s, 2]}, Integers]

I am trying to solve this equation

The link has a screen capture of the equation and the solution. I am looking for the values of a1 and a2 in particular, but they need to be real numbers. s1 and s2 are integers. Now if I remove the condition of integers, then (as expected) the computation takes too long (it hadn't finished for an hour). My questions are:

  1. Is it possible to define a1 and a2 to be reals, and s1 and s2 to be integers?

  2. I would like to reduce the possible values of a1 and a2 to the tenth decimal point (i.e. between 0 and 1, it can have 0.1, 0.2, 0.3,...0.9). Can this be done in Mathematica?

I am trying to solve this equation

The link has a screen capture of the equation and the solution. I am looking for the values of a1 and a2 in particular, but they need to be real numbers. s1 and s2 are integers. Now if I remove the condition of integers, then (as expected) the computation takes too long (it hadn't finished for an hour). My questions are:

  1. Is it possible to define a1 and a2 to be reals, and s1 and s2 to be integers?

  2. I would like to reduce the possible values of a1 and a2 to the tenth decimal point (i.e. between 0 and 1, it can have 0.1, 0.2, 0.3,...0.9). Can this be done in Mathematica?

Edit (The code for the equation):

Maximize[{3/100000 - ( Subscript[s, 1]*Subscript[a, 1] + Subscript[s, 2]*Subscript[a, 2])/(50000 Subscript[a, 1]) - ( 3 (Subscript[s, 1]*Subscript[a, 1] + Subscript[s, 2]*Subscript[a, 2]))/(25000 Subscript[a, 2]) + 1/( 400000000000 Subscript[a, 1] Subscript[a, 2]) + ( 3 (Subscript[s, 1]*Subscript[a, 1] + Subscript[s, 2]*Subscript[a, 2])^2)/( 100000 Subscript[a, 1] Subscript[a, 2]) + (9 Subscript[a, 1])/( 100000 Subscript[a, 2]), Subscript[a, 1] >= 1 && Subscript[a, 1] <= 5 && Subscript[a, 2] >= 1 && Subscript[a, 2] <= 5 && Subscript[s, 1] + Subscript[s, 2] == 10 && Subscript[s, 1] >= 0 && Subscript[s, 2] >= 0}, {Subscript[a, 1], Subscript[a, 2], Subscript[s, 1], Subscript[s, 2]}, Integers]

Routine clean-up
Source Link
m_goldberg
  • 108.1k
  • 16
  • 104
  • 259

Trying to solvemaximize an equationexpression with one set of variables as integersinteger and the other as real numbersvariables

I am trying to solve the following equation: !http://imgur.com/x0B7cNnthis equation

The link has a screen capture of the equation and the solution. I am looking for the values of a1 and a2 in particular, but they need to be real numbers. s1 and s2 are integers. Now if I remove the condition of integers, then (as expected) the computation takes too long (it hadn't finished for an hour). My questions are:

  1. Is it possible to define a1 and a2 to be reals, and s1 and s2 to be integers?

  2. I would like to reduce the possible values of a1 and a2 to the tenth decimal point (i.e. between 0 and 1, it can have 0.1, 0.2, 0.3,...0.9). Can this be done in MathematicaMathematica?

Thank you for your help!

Trying to solve an equation with one set of variables as integers and the other as real numbers

I am trying to solve the following equation: !http://imgur.com/x0B7cNn

The link has a screen capture of the equation and the solution. I am looking for the values of a1 and a2 in particular, but they need to be real numbers. s1 and s2 are integers. Now if I remove the condition of integers, then (as expected) the computation takes too long (it hadn't finished for an hour). My questions are:

  1. Is it possible to define a1 and a2 to be reals, and s1 and s2 to be integers?

  2. I would like to reduce the possible values of a1 and a2 to the tenth decimal point (i.e. between 0 and 1, it can have 0.1, 0.2, 0.3,...0.9). Can this be done in Mathematica?

Thank you for your help!

Trying to maximize an expression with integer and real variables

I am trying to solve this equation

The link has a screen capture of the equation and the solution. I am looking for the values of a1 and a2 in particular, but they need to be real numbers. s1 and s2 are integers. Now if I remove the condition of integers, then (as expected) the computation takes too long (it hadn't finished for an hour). My questions are:

  1. Is it possible to define a1 and a2 to be reals, and s1 and s2 to be integers?

  2. I would like to reduce the possible values of a1 and a2 to the tenth decimal point (i.e. between 0 and 1, it can have 0.1, 0.2, 0.3,...0.9). Can this be done in Mathematica?

Source Link
p1988
  • 23
  • 3
Loading