cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
%3CLINGO-SUB%20id%3D%22lingo-sub-418487%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%E5%A6%82%E4%BD%95%E8%8E%B7%E5%BE%97%20x%20%E5%80%BC%EF%BC%8C%E8%AF%A5%E5%80%BC%E7%BB%99%E5%87%BA%E6%9B%B2%E7%BA%BF%E4%B8%8B%E9%9D%A2%E7%A7%AF%E7%9A%84%2050%25%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-418487%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3E%E6%88%91%E6%9C%89%E4%B8%80%E4%BA%9B%E8%BF%9E%E7%BB%AD%E6%95%B0%E6%8D%AE%EF%BC%8C%E6%88%91%E4%BD%BF%E7%94%A8%E2%80%9C%E6%8B%9F%E5%90%88%E6%A8%A1%E5%9E%8B%E2%80%9D%E6%8B%9F%E5%90%88%E6%9B%B2%E7%BA%BF%EF%BC%8C%E5%B9%B6%E4%BD%BF%E7%94%A8%E5%B1%9E%E6%80%A7%E2%80%9C%E7%BB%93%E6%A0%B7%E6%9D%A1%E6%95%88%E5%BA%94%E2%80%9D%E5%92%8C%2050%20%E8%8A%82%E3%80%82%E7%84%B6%E5%90%8E%E6%88%91%E5%B0%86%E9%A2%84%E6%B5%8B%E5%85%AC%E5%BC%8F%E4%BF%9D%E5%AD%98%E5%88%B0%E8%A1%A8%E4%B8%AD%E3%80%82%E6%8E%A5%E4%B8%8B%E6%9D%A5%E6%88%91%E6%83%B3%E5%81%9A%E7%9A%84%E6%98%AF%E6%89%BE%E5%88%B0%E7%89%87%E6%AE%B5%E5%A4%A7%E5%B0%8F%EF%BC%88x%20%E5%80%BC%EF%BC%89%EF%BC%8C%E5%AE%83%E7%BB%99%E5%87%BA%E4%BA%86%205%25%E3%80%8110%25%E3%80%8125%25%E3%80%8150%25%E3%80%8175%25%E3%80%8190%25%20%E5%92%8C%2095%25%20%E7%9A%84%E9%9D%A2%E7%A7%AF%E3%80%82%E6%88%91%E6%9C%89%2010%20%E4%B8%AA%E6%A0%B7%E6%9C%AC%EF%BC%8C%E6%89%80%E4%BB%A5%E6%88%91%E6%9C%89%2010%20%E4%B8%AA%E9%9D%9E%E5%B8%B8%E5%A4%8D%E6%9D%82%E7%9A%84%E6%96%B9%E7%A8%8B%E3%80%82%3C%2FP%3E%3CP%3E%E5%A6%82%E4%BD%95%E8%8E%B7%E5%BE%97%E6%9B%B2%E7%BA%BF%E4%B8%8B%E4%B8%8D%E5%90%8C%E9%9D%A2%E7%A7%AF%E7%9A%84%E7%89%87%E6%AE%B5%E5%A4%A7%E5%B0%8F%EF%BC%88x%E5%80%BC%EF%BC%89%EF%BC%9F%E6%88%91%E5%AF%B9%E8%84%9A%E6%9C%AC%E4%B8%8D%E7%86%9F%E6%82%89%EF%BC%8C%E6%89%80%E4%BB%A5%E5%A6%82%E6%9E%9C%E5%8F%AF%E8%83%BD%E7%9A%84%E8%AF%9D%EF%BC%8C%E6%88%91%E6%9B%B4%E5%96%9C%E6%AC%A2%E5%AD%A6%E4%B9%A0%E9%BC%A0%E6%A0%87%E7%82%B9%E5%87%BB%E6%96%B9%E5%BC%8F%E3%80%82%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202021-09-15%20161811.png%22%20style%3D%22width%3A%20414px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%202021-09-15%20161811.png%22%20style%3D%22width%3A%20414px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F35837iAEE33E38FA310F7E%2Fimage-dimensions%2F414x636%3Fv%3Dv2%22%20width%3D%22414%22%20height%3D%22636%22%20role%3D%22button%22%20title%3D%22Screenshot%202021-09-15%20161811.png%22%20alt%3D%22Screenshot%202021-09-15%20161811.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-418487%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CLINGO-LABEL%3E%E9%AB%98%E7%BA%A7%E7%BB%9F%E8%AE%A1%E5%BB%BA%E6%A8%A1%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-418567%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E5%A6%82%E4%BD%95%E8%8E%B7%E5%BE%97%E6%9B%B2%E7%BA%BF%E4%B8%8B%2050%25%20%E9%9D%A2%E7%A7%AF%E7%9A%84%20x%20%E5%80%BC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-418567%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%88%91%E7%94%A8%E8%BF%99%E4%B8%AA%3CA%20href%3D%22https%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F16.1%2Findex.shtml%23page%2Fjmp%2Fknotted-spline-effect-example.shtml%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%E4%BE%8B%E5%AD%90%3C%2FA%3E%E6%9D%A5%E8%AF%B4%E6%98%8E%E4%B8%80%E7%A7%8D%E6%96%B9%E6%B3%95%E3%80%82%20%E6%88%91%E6%8C%89%E7%85%A7%E8%AF%B4%E6%98%8E%E8%BF%9B%E8%A1%8C%E6%93%8D%E4%BD%9C%EF%BC%8C%E7%9B%B4%E5%88%B0%E7%AC%AC%207%20%E6%AD%A5%E3%80%82%20%E7%84%B6%E5%90%8E%E4%BB%8E%E6%8A%A5%E8%A1%A8%E7%9A%84%E7%BA%A2%E8%89%B2%E5%B0%8F%E4%B8%89%E8%A7%92%E8%8F%9C%E5%8D%95%E4%B8%AD%EF%BC%8C%E6%88%91%E9%80%89%E6%8B%A9%E2%80%9C%E4%BF%9D%E5%AD%98%E5%88%97%E2%80%9D%26gt%3B%E2%80%9C%E9%A2%84%E6%B5%8B%E5%85%AC%E5%BC%8F%E2%80%9D%E3%80%82%20%E7%8E%B0%E5%9C%A8%E6%88%91%E5%BE%97%E5%88%B0%E4%B8%80%E4%B8%AA%E6%96%B0%E7%9A%84%E5%88%97%EF%BC%8C%E5%85%AC%E5%BC%8F%E6%98%AF%E6%9B%B2%E7%BA%BF%E7%9A%84%E5%87%BD%E6%95%B0%E3%80%82%20%E4%BB%8E%E5%88%97%E4%B8%AD%E5%A4%8D%E5%88%B6%E5%85%AC%E5%BC%8F%E3%80%82%3C%2FP%3E%0A%3CP%3E%E7%8E%B0%E5%9C%A8%E8%BD%AC%E5%88%B0%E8%84%9A%E6%9C%AC%E7%B4%A2%E5%BC%95%EF%BC%8C%E6%89%BE%E5%88%B0%E2%80%9C%E9%9B%86%E6%88%90%E2%80%9D%E5%8A%9F%E8%83%BD%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22peng_liu_1-1631762883318.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_1-1631762883318.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_1-1631762883318.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_1-1631762883318.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F35852i2FE6BCA02301B5C4%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22peng_liu_1-1631762883318.png%22%20alt%3D%22peng_liu_1-1631762883318.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E7%8E%B0%E5%9C%A8%E7%B2%98%E8%B4%B4%E5%85%AC%E5%BC%8F%E5%B9%B6%E6%9B%BF%E6%8D%A2%E7%AA%81%E5%87%BA%E6%98%BE%E7%A4%BA%E7%9A%84%E9%83%A8%E5%88%86%EF%BC%8C%E5%BE%97%E5%88%B0%E8%BF%99%E4%B8%AA%EF%BC%9A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22peng_liu_2-1631762981590.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_2-1631762981590.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_2-1631762981590.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_2-1631762981590.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F35853i981E93B8AA9A7454%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22peng_liu_2-1631762981590.png%22%20alt%3D%22peng_liu_2-1631762981590.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E7%8E%B0%E5%9C%A8%E9%80%9A%E8%BF%87%E7%94%A8%E7%A9%BA%E5%AD%97%E7%AC%A6%E4%B8%B2%E6%9B%BF%E6%8D%A2%E5%86%92%E5%8F%B7%E6%9D%A5%E5%88%A0%E9%99%A4%E6%89%80%E6%9C%89%E5%86%92%E5%8F%B7%E7%AC%A6%E5%8F%B7%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22peng_liu_3-1631763183428.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_3-1631763183428.png%22%20style%3D%22width%3A%20365px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_3-1631763183428.png%22%20style%3D%22width%3A%20365px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_3-1631763183428.png%22%20style%3D%22width%3A%20365px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F35854i8FCD7A8DDEBB9C46%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22peng_liu_3-1631763183428.png%22%20alt%3D%22peng_liu_3-1631763183428.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E8%BF%98%E5%B0%86%E2%80%9Cx%E2%80%9D%E6%9B%BF%E6%8D%A2%E4%B8%BA%E2%80%9Cage%E2%80%9D%EF%BC%8C%E6%88%91%E7%9A%84%20x%20%E5%8F%98%E9%87%8F%E5%90%8D%E7%A7%B0%E3%80%82%3C%2FP%3E%0A%3CP%3E%E7%8E%B0%E5%9C%A8%E5%86%B3%E5%AE%9A%E7%A7%AF%E5%88%86%E7%9A%84%E4%B8%8A%E9%99%90%20(100%25)%EF%BC%8C%E6%AF%94%E5%A6%82%2080%E3%80%82%20100%25%20%E7%9A%84%E7%BB%93%E6%9E%9C%E6%98%AF%2069.783%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22peng_liu_5-1631763270010.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_5-1631763270010.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_5-1631763270010.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_5-1631763270010.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F35856i9285E4DB7A646E5D%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22peng_liu_5-1631763270010.png%22%20alt%3D%22peng_liu_5-1631763270010.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E7%8E%B0%E5%9C%A8%E7%9A%84%E4%BB%BB%E5%8A%A1%E6%98%AF%E6%89%BE%E4%B8%80%E4%B8%AA%E6%95%B0%E6%9D%A5%E4%BB%A3%E6%9B%BF80%EF%BC%8C%E7%BB%99%E6%88%9150%25%EF%BC%9A69.783%2F2%3D34.8915%E3%80%82%20%E7%BB%8F%E8%BF%87%E5%8D%81%E5%87%A0%E6%AC%A1%E5%B0%9D%E8%AF%95%E5%92%8C%E9%94%99%E8%AF%AF%E5%90%8E%EF%BC%8C%E6%88%91%E5%BE%97%E5%88%B0%E4%BA%86%2044.228%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22peng_liu_6-1631763432932.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_6-1631763432932.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_6-1631763432932.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_6-1631763432932.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F35857iED72FE1B7223CAE5%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22peng_liu_6-1631763432932.png%22%20alt%3D%22peng_liu_6-1631763432932.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E5%AE%83%E9%9C%80%E8%A6%81%20JSL%20%E7%BC%96%E7%A8%8B%EF%BC%8C%E4%BD%86%E4%B8%8D%E5%A4%9A%EF%BC%8C%E5%8F%AF%E4%BB%A5%E5%BF%AB%E9%80%9F%E8%8E%B7%E5%BE%97%E6%9B%B4%E7%B2%BE%E7%A1%AE%E7%9A%84%E7%BB%93%E6%9E%9C%E3%80%82%20%E4%B8%BB%E8%A6%81%E8%BF%98%E6%98%AF%E5%A4%8D%E5%88%B6%E7%B2%98%E8%B4%B4%E3%80%82%20%E8%AF%B7%E5%8F%82%E8%A7%81%E4%BB%A5%E4%B8%8B%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22peng_liu_9-1631764338721.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_9-1631764338721.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_9-1631764338721.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22peng_liu_9-1631764338721.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F35860i35CEB26C3BD53D54%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22peng_liu_9-1631764338721.png%22%20alt%3D%22peng_liu_9-1631764338721.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E5%85%B3%E9%94%AE%E6%98%AF%E6%89%BE%E5%88%B0%E4%BD%BF%E7%A7%AF%E5%88%86%E4%B8%8E%E7%9B%AE%E6%A0%87%E5%80%BC%2034.8919%20%E4%B9%8B%E9%97%B4%E7%9A%84%E5%B9%B3%E6%96%B9%E5%B7%AE%E6%9C%80%E5%B0%8F%E7%9A%84%E5%80%BC%E3%80%82%20%E6%89%80%E4%BB%A5%E6%88%91%E5%B0%86%E7%A7%AF%E5%88%86%E5%92%8C%E7%9B%AE%E6%A0%87%E4%B9%8B%E9%97%B4%E7%9A%84%E5%B7%AE%E5%BC%82%E5%8C%85%E8%A3%85%E5%9C%A8%E4%B8%80%E4%B8%AA%E6%AD%A3%E6%96%B9%E5%BD%A2%E5%86%85%EF%BC%8C%E7%84%B6%E5%90%8E%E8%B0%83%E7%94%A8%E6%9C%80%E5%B0%8F%E5%8C%96%E5%87%BD%E6%95%B0%E3%80%82%20%E6%9F%A5%E7%9C%8B%E8%AF%AD%E6%B3%95%E7%9A%84%E5%87%BD%E6%95%B0%E6%96%87%E6%A1%A3%E3%80%82%2050%25%20%E7%9A%84%E7%BB%93%E6%9E%9C%E6%98%AF%2044.226900491921%E3%80%82%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
dtsang
Level I

how to get the x-value which gives me 50% of area under a curve

I have some continuous data and I fit a curve using "Fit Model" and used attributes "Knotted Spline Effect" and 50 knots. Then I save the prediction formula to the table. What I want to do next is to find the fragment size (x-value) which gives me 5%, 10%, 25%, 50%, 75%, 90% and 95% of area. I have 10 samples and so I have 10 very complicated equations.

How do I get the fragment size (x-value) with different area under the curve? I am not familiar with scripts so I prefer learning the mouse clicking way if possible.

 

Screenshot 2021-09-15 161811.png

1 REPLY 1
peng_liu
Staff

Re: how to get the x-value which gives me 50% of area under a curve

I use this example to illustrate one approach. I follow the instructions up to step 7. Then from the red triangle menu of the report, I choose "Save Columns" > "Prediction Formula". Now I get a new column, and the formula is the function of the curve. Copy the formula from the column.

Now go to Scripting Index, and find "Integrate" function.

peng_liu_1-1631762883318.png

Now paste the formula and replace the highlighted part, get this:

peng_liu_2-1631762981590.png

Now remove all the colon symbols, by replacing colon by empty string.

peng_liu_3-1631763183428.png

Also replace "x" by "age", my x variable name.

Now decide where the upper limit of the integration (100%), say 80. And the result is 69.783 for 100%.

peng_liu_5-1631763270010.png

Now the task is to find a number to replace 80, and give me 50%: 69.783/2=34.8915. I got 44.228 after maybe a dozen try and error.

peng_liu_6-1631763432932.png

It requires JSL programming, but not much, to get more precise result quickly. Mostly still copy and paste. See the following screenshot.

peng_liu_9-1631764338721.png

The key is to find the value that minimize the squared difference between integral and the target value 34.8919. So I wrap the difference between integral and the target inside of a square, then call minimize function. Check out the function documentation for the syntax. The result for 50% is 44.226900491921.