Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.4K Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Help minimizing a variable?

Posted 10 years ago

Hello! I am trying to figure out at what point in time, t, all elements of some vector will be AT LEAST (>=) 0.1. I tried using the "Solve" function but it is not Outputting anything. See below my code:

Solve[((-(1/(3 Sqrt[13])))*
     Exp[-5.302775637731995*t]*{-1.6513878188659972, -0.5, -0.5, 
      3.3027756377319943, -1.6513878188659972, 
      1.}) + ((1/20 (-5 + Sqrt[5]))*
     Exp[-4.618033988749895*t]*{-1., 
      1.618033988749895, -1.618033988749895, 0., 1., 
      0.}) + ((2/((-5 + Sqrt[13]) (5 + Sqrt[13]))) Exp[-4*t]*{-1., 1.,
       1., -1., -1., 1.}) + ((1/20 (-5 - Sqrt[5]))*
     Exp[-2.381966011250105*t]*{-1., -0.6180339887498949, 
      0.6180339887498949, 0., 1., 0.}) + ((1/(3 Sqrt[13]))*
     Exp[-1.6972243622680054*
       t]*{0.1513878188659973, -0.5, -0.5, -0.3027756377319946, 
      0.1513878188659973, 
      1.}) + ((-(2/((-5 + Sqrt[13]) (5 + Sqrt[13]))))*{1., 1., 1., 1.,
       1., 1.}) >= {0.1, 0.1, 0.1, 0.1, 0.1, 0.1}, t]

If it's too complicated, essentially I'm working on a diffusion problem and I have the equation for a given starting value at each node (there are 6). I want to minimize t such that each node has at least 0.1 units in it.

Thanks!

POSTED BY: Alex Daitch
3 Replies
In[1]:= FindMinimum[{t, 
  Thread[((-(1/(3 Sqrt[13])))*
       Exp[-5.302775637731995*t]*{-1.6513878188659972, -0.5, -0.5, 
        3.3027756377319943, -1.6513878188659972, 
        1.}) + ((1/20 (-5 + Sqrt[5]))*
       Exp[-4.618033988749895*t]*{-1., 
        1.618033988749895, -1.618033988749895, 0., 1., 
        0.}) + ((2/((-5 + Sqrt[13]) (5 + Sqrt[13]))) Exp[-4*t]*{-1., 
        1., 1., -1., -1., 1.}) + ((1/20 (-5 - Sqrt[5]))*
       Exp[-2.381966011250105*t]*{-1., -0.6180339887498949, 
        0.6180339887498949, 0., 1., 0.}) + ((1/(3 Sqrt[13]))*
       Exp[-1.6972243622680054*
         t]*{0.1513878188659973, -0.5, -0.5, -0.3027756377319946, 
        0.1513878188659973, 
        1.}) + ((-(2/((-5 + Sqrt[13]) (5 + Sqrt[13]))))*{1., 1., 1., 
        1., 1., 1.}) >= {0.1, 0.1, 0.1, 0.1, 0.1, 0.1}]}, {{t, .6}}]


Out[1]= {0.620015, {t -> 0.620015}}
POSTED BY: Frank Kampas
Posted 10 years ago

That's exactly what I'm trying to do. The answer should be ~0.621 as I did it by trial and error. But I can't figure out how solve for the minimum t when the inequality is satisfied

POSTED BY: Alex Daitch

Are you trying to find the minimum value of t at which the inequalities are satisfied? I tried doing that with FindMinimum but it didn't converge well.

In[12]:= FindMinimum[{t, 
  Thread[((-(1/(3 Sqrt[13])))*
       Exp[-5.302775637731995*t]*{-1.6513878188659972, -0.5, -0.5, 
        3.3027756377319943, -1.6513878188659972, 
        1.}) + ((1/20 (-5 + Sqrt[5]))*
       Exp[-4.618033988749895*t]*{-1., 
        1.618033988749895, -1.618033988749895, 0., 1., 
        0.}) + ((2/((-5 + Sqrt[13]) (5 + Sqrt[13]))) Exp[-4*t]*{-1., 
        1., 1., -1., -1., 1.}) + ((1/20 (-5 - Sqrt[5]))*
       Exp[-2.381966011250105*t]*{-1., -0.6180339887498949, 
        0.6180339887498949, 0., 1., 0.}) + ((1/(3 Sqrt[13]))*
       Exp[-1.6972243622680054*
         t]*{0.1513878188659973, -0.5, -0.5, -0.3027756377319946, 
        0.1513878188659973, 
        1.}) + ((-(2/((-5 + Sqrt[13]) (5 + Sqrt[13]))))*{1., 1., 1., 
        1., 1., 1.}) >= {0.1, 0.1, 0.1, 0.1, 0.1, 0.1}]}, t]

During evaluation of In[12]:= FindMinimum::eit: The algorithm does not converge to the tolerance of 4.806217383937354`*^-6 in 500 iterations. The best estimated solution, with feasibility residual, KKT residual, or complementary residual of {6.40971*10^7,1.,1.06856*10^7}, is returned. >>

Out[12]= {1.89833*10^18, {t -> 1.89833*10^18}}
POSTED BY: Frank Kampas
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard