由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - solve equations of integrals in python (转载)
相关主题
solve integral eq. embeeded with another integral eq. (转载)Interview street上的一题求助
solve an optimization model with integral as constraints (转载)A家面试题
calculate an integral in python (转载)关于leetcode使用方法一问
这道算法面试题怎么做?求一元一次方程的解给大家看几道C 小程序
问一道fb的面试题目一道题,我觉得挺难
zenefits店面 -已挂了一个基本的string问题
error of gamma.fit() in python (转载)请帮忙看道题 c++ operator overload
面试就是面试问题,跟实际问题差太远做题了,看看有没有比我更好的解法 (20个包子)
相关话题的讨论汇总
话题: integrals话题: equations话题: def话题: solve话题: import
进入JobHunting版参与讨论
1 (共1页)
l******9
发帖数: 579
1
【 以下文字转载自 Statistics 讨论区 】
发信人: light009 (light009), 信区: Statistics
标 题: solve equations of integrals in python
发信站: BBS 未名空间站 (Fri Mar 21 12:21:31 2014, 美东)
I need to solve system equations of integrals in python 3.2.
from sympy import S, Eq, solve, integrals
import sympy as sym
import scipy.integrate as integ
x, b, c, m, v, L, u = S('x, b, c, m, v, L, u'.split())
equations = [Eq(m, integ.quad(xf(x, b, c), L, u))]
def xf(x, b,c):
return x*f(x,b,c)
def f(x, b, c):
return g(x, b,c) * (x/b)**(c-1) * sym.exp(-x/b)
def g(x, b, c):
c = 1+c // TypeError: unsupported operand type(s) for +: 'int' and '
tuple'
L = 1
u = 10
ff1 = b*g1(c, L/b)
def g1(a,z):
x = symbols('x')
return sym.integrate(x**(a-1) * sym.exp(-2*x), (x,z, sym.oo))
Any help would be appreciated !
1 (共1页)
进入JobHunting版参与讨论
相关主题
做题了,看看有没有比我更好的解法 (20个包子)问一道fb的面试题目
Amazon电面经zenefits店面 -已挂了
c++ 问题error of gamma.fit() in python (转载)
在线等 precomplete OPT 还需要注册交学费吗面试就是面试问题,跟实际问题差太远
solve integral eq. embeeded with another integral eq. (转载)Interview street上的一题求助
solve an optimization model with integral as constraints (转载)A家面试题
calculate an integral in python (转载)关于leetcode使用方法一问
这道算法面试题怎么做?求一元一次方程的解给大家看几道C 小程序
相关话题的讨论汇总
话题: integrals话题: equations话题: def话题: solve话题: import