Julia-根据常数计算精确积分

时间:2019-06-03 12:23:33

标签: math julia

使用MTH229,您可以计算具有不同可能性的积分。但是,如果我想根据常数来计算一个呢?

例如:

integrate(x->x^3, 0, 1) 

完美运行。以及:

integrate(x->x^3)

但是,如果我想根据C来计算确切的值怎么办呢?integrate(x->C*x^3) # Obviously doesn't work as C isn't defined. 是下面的实常数:

C

注1:这里我使用一个简化得多的函数进行积分,我需要的是一个具有其他度数和更复杂系数的多项式。

注2:因此,我仅使用一个常量C1, C2, C3,但实际上我有多个MTH229等。

注3:我对select userid, avg(score) filter (where seqnum_asc <= @n) as first_n_avg, avg(score) filter (where seqnum_desc <= @n) as last_n_avg from (select t.*, row_number() over (partition by userid order by date) as seqnum_asc, row_number() over (partition by userid order by date desc) as seqnum_desc, count(*) over (partition by userid) as cnt from t ) t where cnt >= @M * @N group by userid having max(testdate) >= min(testdate) + @Y * interval '1 year' order by (last_n_avg - first_n_avg) desc; 包不满意。任何Julia包的工作都可以:)

编辑:实际上,我正在寻找的是在Python-Scipy中计算具有附加参数的积分,但要具有精确的表达式(而不是在0和1内求值,如下图所示): enter image description here

1 个答案:

答案 0 :(得分:2)

_activityName -As a Steps Labels stepCount= lenght of array currentPosition: currentStepPosition.length (count of _activityStatus("I")) Now I have to display custom steps below the Steps lebels . ("_maxHoldTime" I have to display with _activityName in 2 lines ) for example FXL_ACT1 _maxHoldTime: "60" | FXL_ACT2" _maxHoldTime: "60" currentNextActivity: Array(3) 0: __typename: "CurrentNextActivity" _activityName: "FXL_ACT1" _activityStatus: "I" _maxHoldTime: "60" _userName: "tecnotree" 1: __typename: "CurrentNextActivity" _activityName: "FXL_ACT2" _activityStatus: "I" _maxHoldTime: "60" _userName: "tecnotree" __proto__: Object 2: __typename: "CurrentNextActivity" _activityName: "FXL_ACT3" _activityStatus: "N" _maxHoldTime: "120" _userName: null StepsVaue:[], Steplabels:[], currentStepPosition:[] // here I am pssing currentNextActivity array in StepsVaue . StepsVaue = workFlowDetails.currentNextActivity; Steplabels = StepsVaue.map(StepsVaue => { return StepsVaue._activityName; }); currentStepPosition = StepsVaue.filter((item) => { return item._activityStatus === "I" }); <StepIndicator customStyles={stepIndicatorStyles} currentPosition={currentStepPosition.length} stepCount={Steplabels.length} labels={Steplabels} renderLabel={} direction="vertical" /> 只不过是SymPy对integrate对象的集成的包装。要执行您想要的操作,您需要使用Function的语法:

SymPy