Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mathematica:How to solve the summation of numerical integration

  1. Aug 13, 2010 #1
    From the attachment. i would like to know how to find (t_1 and t_2)minimum if given t_0=0 and t_3=5.It seem like when using excel solver to find the minimum.anyone know how to do it with mathematica?

    Attached Files:

  2. jcsd
  3. Aug 13, 2010 #2
    In my experience with MMA trying to use subscripts is often more trouble than it is worth.

    What I would do is

    t0 = 0; t3 = 5; NMinimize[{
    Integrate[0.25`(E^(-0.015`*t)*(-4044.4444444444443`*E^(-0.015`*t1) + E^(0.015`*t)*(4044.4444444444443` - 66.6666666666667`*t) + 66.6666666666667`*E^(0.015`*t1)*t1))^2, {t, t0, t1}] +
    Integrate[0.25`(E^(-0.015`*t)*(-4044.4444444444443`*E^(-0.015`*t2) + E^(0.015`*t)*(4044.4444444444443` - 66.6666666666667`*t) + 66.6666666666667`*E^(0.015`*t2)*t1))^2, {t, t1, t2}] +
    Integrate[0.25`(E^(-0.015`*t)*(-4044.4444444444443`*E^(-0.015`*t3) + E^(0.015`*t)*(4044.4444444444443` - 66.6666666666667`*t) + 66.6666666666667`*E^(0.015`*t3)*t1))^2,{t, t2, t3}],
    t0 <= t1 && t1 <= t2 && t2 <= t3}, {t1, t2}]

    and it gives you an answer in a few seconds.
  4. Aug 13, 2010 #3
    thanks for da help.it really help me.but is there any other way to solve when n become a large number.like we change 3 into 10 and we want to find t1 until t9.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook