Results 1 to 11 of 11

Math Help - Simple but long proof...

  1. #1
    Newbie
    Joined
    Jun 2012
    From
    Atlanta
    Posts
    6

    Simple but long proof...

    All,

    First off I hope this is the right forum, if not let me know and I will gladly move it.

    I am a developer and have recently been given the equation and proof below to turn into code. I know it is a lot to ask but if someone could help me solve this step by step I can use this to program from. I have honestly spent hours and have yet been able to come up with the same answer. Any help is greatly appreciated!!

    Simple but long proof...-sshot-9.png

    Variables:
    SI=60, T=1, C1=1.1557, C2=1.0031, C3=-0.0408, AGET=76.4073801204541, C4=0.9807, C5=0.0314, CR=0.475, RHK=1, RHYXS=0.05, RHM=1.1, RHR=13, RHB=-1.6, RELHT=0.806719650456935, RHXS=0

    Expected Result:
    HG= 0.112113426675006
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Dec 2007
    From
    Ottawa, Canada
    Posts
    3,116
    Thanks
    68

    Re: Simple but long proof...

    No idea what you mean by "turning into code"; or by "proof".

    Noticed that the .75*RHK*? has a right bracket ")" missing.

    What are you looking for? Ways to shorten? Ways to "keypunch it in"?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jun 2012
    From
    Atlanta
    Posts
    6

    Re: Simple but long proof...

    I am actually just trying to verify that this equation does indeed solve to the expected result. My math is not strong enough for me to tell if there is a something wrong with how I am coding it, or if there is something wrong with the proof. I do see the missing closing bracket. I will follow up on that and verify its location. I really appreciate your help.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Joined
    Dec 2007
    From
    Ottawa, Canada
    Posts
    3,116
    Thanks
    68

    Re: Simple but long proof...

    Also, the |_ _| brackets shown (beginning and end of equation) mean the "floor function"
    (as example, if 3.746... then 3 is result), which makes no sense given your expected
    results of HG= 0.112113426675006

    I assume e = Euler number.

    The "powers" are quite difficult to discern; can you show them in a clear way?

    Other minor stuff is confusing, like why mutiply by T when T=1 ?!
    Last edited by Wilmer; June 2nd 2012 at 12:04 PM.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Jun 2012
    From
    Atlanta
    Posts
    6

    Re: Simple but long proof...

    Very helpful heads up on the floor function. I had only considered it as a grouping function.

    e is Euler number.

    T is for a duration variable. The objective of this equation is to calculate the amount a tree has grown for a single cycle and the duration of the cycle is specified by T.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor
    Joined
    Dec 2007
    From
    Ottawa, Canada
    Posts
    3,116
    Thanks
    68

    Re: Simple but long proof...

    OK. You have RHSX = 0. Is that ok? Means RHSX^(1 - RHB) = 0.

    Finally, on powers:
    the right portion of 2nd line of equation shows e^[-RHR / (1 - RHB)] * (another expression) :
    is the "other expression" part of the "power", or is it just a subsequent multiplication?

    AND the missing half-bracket?!
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Jun 2012
    From
    Atlanta
    Posts
    6

    Re: Simple but long proof...

    OK the flooring brackets are meant to be parenthesis.
    The missing half bracket is supposed to include the rest of the line. .75*RHK*(...(1/1-RHM))
    e^[-RHR / (1 - RHB)] * (another expression) - this is part of the power

    You have been a tremendous help on this. I really appreciate it, I had no idea there were this many anomalies in this equation.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    MHF Contributor
    Joined
    Dec 2007
    From
    Ottawa, Canada
    Posts
    3,116
    Thanks
    68

    Re: Simple but long proof...

    Quote Originally Posted by cwigley View Post
    T is for a duration variable. The objective of this equation is to calculate the amount a tree has grown for a single cycle and the duration of the cycle is specified by T.
    HOKAY!! Now I see why parts of your equation are a bit like Future Value of money formulas...
    The using of e^(.....) is obviously for continuous compounding.

    Well, I entered your formula along with the values of the variables (I use UBasic programming)
    but cannot come anywhere near .112113.... as solution: I get 0.006953....

    You got that formula from "WHO"?

    Again, I'll tell you that I don't understand what you mean by needing "help in coding".
    Let's take something simple:
    A = u + v + w^x
    u=4, v=5, w=2, x=3
    Much smaller/simpler than your problem, but works same way.
    To "code" that in UBasic:

    u=4, v=5, w=2, x=3
    A = u + v + w^x
    Print A
    output: 17

    If it helps, I renamed your variables this way:
    u=C1=1.1557, v=C2=1.0031, w=C3=-0.0408, x=C4=0.9807, y=C5=0.0314, z=CR=0.475
    p=SI=60, q=RELHT=0.806719650456935, r=AGET=76.4073801204541
    f=RHB=-1.6, g=RHK=1, h=RHM=1.1, i=RHR=13, j=RHXS=0, k=RHYXS=0.05

    So, as example, the left side of the 1st line of your formula becomes:
    u * p^v * (1 - e^(w * (r - 1)))^(x * p^y)
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Newbie
    Joined
    Jun 2012
    From
    Atlanta
    Posts
    6

    Re: Simple but long proof...

    Man after many rounds with the provider of that #$@! equation I finally got it worked out. I started off assuming the equation was right and my math was wrong. Turns out there were several errors in there that were a result of him not knowing how to specify his needs in an equation. Below is the working C# code that produces the desired result. You will notice a couple of bounding statements that weren't in the original equation!!

    You have no idea how much you helped me man, truely appreciate it. I was losing my mind!

    private double getHeightGrowth(){
    double condition1 = (100*Math.Pow(CR, 3.0)*Math.Exp(-5.0*CR)) > 1.0 ? 0.99 : (100*Math.Pow(CR, 3.0)*Math.Exp(-5.0*CR));
    double condition2 = (RHK)*Math.Pow((1.0+((Math.Pow((RHK/RHYXS), (RHM-1.0)))-1.0)*Math.Exp(((-1.0*RHR)/(1.0-RHB))*((Math.Pow(RelativeHeight, (1.0-RHB)))-(Math.Pow(RHXS, (1.0-RHB)))))),(1.0/(1.0-RHM))) > 1.0
    ? 0.99
    : (RHK)*Math.Pow((1.0+((Math.Pow((RHK/RHYXS), (RHM-1.0)))-1.0)*Math.Exp(((-1.0*RHR)/(1.0-RHB))*((Math.Pow(RelativeHeight, (1.0-RHB)))-(Math.Pow(RHXS, (1.0-RHB)))))),(1.0/(1.0-RHM)));
    double result = DurationOfCycle*
    (((C1*(Math.Pow(SiteIndex, C2)))*Math.Pow((1.0-Math.Exp(C3*((AGET)+5.0))), (Math.Pow((C4*SiteIndex), C5))))-
    ((C1*(Math.Pow(SiteIndex, C2)))*Math.Pow((1.0-Math.Exp(C3*(AGET))), (Math.Pow((C4*SiteIndex), C5)))))*(0.25*condition1+0.75*condition2);

    return result/5.0;
    }
    Last edited by cwigley; June 3rd 2012 at 10:00 PM.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    MHF Contributor
    Joined
    Dec 2007
    From
    Ottawa, Canada
    Posts
    3,116
    Thanks
    68

    Re: Simple but long proof...

    Quote Originally Posted by cwigley View Post
    I was losing my mind!

    (100*Math.Pow(CR, 3.0)*Math.Exp(-5.0*CR))
    Happy fer you, buddy; glad to see you're not playing basketball for Jack Nicholson's team!

    Why use that messy C# language...YUK!
    Above would be in Basic: (100 * CR^3 * e^(-5*CR))
    In case you forgot: exp(x) is same as e^x
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Newbie
    Joined
    Jun 2012
    From
    Atlanta
    Posts
    6

    Re: Simple but long proof...

    In that messy C# stuff ^ is an XOr operator. I am happy to code in about anything, do it long enough its all semantics. C# was just part of the requirement
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Long Continuous proof
    Posted in the Differential Geometry Forum
    Replies: 7
    Last Post: December 5th 2011, 05:40 AM
  2. Help with a simple Sin proof
    Posted in the Trigonometry Forum
    Replies: 11
    Last Post: November 22nd 2010, 06:24 AM
  3. Simple proof
    Posted in the Advanced Statistics Forum
    Replies: 2
    Last Post: September 5th 2010, 08:30 PM
  4. Simple Proof
    Posted in the Algebra Forum
    Replies: 1
    Last Post: November 3rd 2008, 05:51 PM
  5. simple proof
    Posted in the Number Theory Forum
    Replies: 1
    Last Post: February 17th 2008, 05:15 PM

Search Tags


/mathhelpforum @mathhelpforum