+ Reply to Thread
Results 1 to 3 of 3

Optimization Problem with integral

  1. #1
    Registered User
    Join Date
    10-01-2014
    Location
    bologna
    MS-Off Ver
    2010
    Posts
    1

    Question Optimization Problem with integral

    Hi everybody. May be the question is easy but it's making me crazy! I need to calculate numerically an integral from 0 to alpha, and then to optimize alpha as it results as much closes to a number (for example 0,7) as it can be! so I got:

    0,7=1+4*(D1(alpha)-1)/alpha

    with: D1(alpha)=1/alpha*integral_{0}^{alpha} x/(exp(x)-1)

    How could I solve this in vba? I know i can solve it optimizing, but the matter is the integal...

    Thank you very much indeed.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,372

    Re: Optimization Problem with integral

    Do you remember your Riemann sums from calculus (http://en.wikipedia.org/wiki/Riemann_sum )? If not, I'd start by refreshing your memory.
    It seems that most users (here anyway) prefer a trapezoidal rule Riemann sum for computing numerical integrals. The code for the integral should be relatively simple:
    Please Login or Register  to view this content.
    From there, to optimize alpha. I would put the function (including the integration part) inside of a VBA UDF. Then, put that UDF inside of a spreadsheet with alpha. Then call Solver and tell it to optimize or find the root of the function cell by changing the alpha cell.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Optimization Problem with integral

    MrShorty, should I move this thread to the non-english forum now?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Looping hide row Optimization problem
    By escobf in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-10-2013, 02:05 PM
  2. Problem Using Solver with an optimization stock problem
    By Jagrubski in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-24-2013, 03:41 AM
  3. Complex Optimization problem through VBA
    By usmanzkhan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-21-2012, 06:09 PM
  4. product mix optimization problem
    By lucabi in forum Excel General
    Replies: 2
    Last Post: 08-19-2012, 02:15 PM
  5. Optimization Problem
    By learningtoride in forum Excel General
    Replies: 0
    Last Post: 06-28-2011, 03:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1