I am trying to figure out why sympy.diff does not differentiate sympy polynomials as expected. Normally, sympy.diff works just fine if a symbolic variable is defined and the polynomial is NOT defined using sympy.Poly. However, if the function is defi
I'm trying to solve a large number (50) of non-linear simultaneous equations in Julia. For the moment I'm just trying to make this work with 2 equations to get the syntax right etc. However, I've tried a variety of packages/tools - NLsolve, nsolve in
I have a file with some equations. I want to solve them using sympy. I can use open('problems.txt',mode='r') to open the file. But how to proceed with sympy? I'm getting following error sympy.core.sympify.SympifyError: Sympify of expression 'could no
I have several expressions of an undefined function some of which contain the corresponding (undefined) derivatives of that function. Both the function and its derivatives exist only as numerical data. I want to make functions out of my expressions a
I would like to evaluate a first derivative of a math equation. I can hard code the formula and get the results but how I can do the same with different user input formulae. I am using Anaconda Python 2.7.9 The following one works when I first compil
Sympy correctly computes the FT of a double-sided exponential decay: x, k, k0 = symbols('x k k0') fourier_transform(exp(-k0 * abs(x)), x, k) --> 2k0 / (4pi^2k^2 + k0^2) Expected by hand calculation and confirmed by http://www.thefouriertransform.c
I am trying to segregate real and imaginary parts of the output for the following program. import sympy as sp a = sp.symbols('a', imaginary=True) b=sp.symbols('b',real=True) V=sp.symbols('V',imaginary=True) a=4*sp.I b=5 V=a+b print V Kindly help. Tha
Using Sympy, say we have an expression f, which is a polynomial of the Symbol "x" (and of potentially other symbols). I would like to know what if there is an efficient way to drop all terms in f of order greater than some integer n. As a special cas
I am using Python with Sympy. I need to solve the following equation, finding the 4 roots (omega is my unknown): deter= 0.6*omega**4*cos(omega*t)**2 - 229.0*omega**2*cos(omega*t)**2 + 5880.0*cos(omega*t)**2 I tried to use solve: eqcarr=solve(deter,om
I have the following code for a system of three nonlinear equations with three unknowns: import sympy as sp from sympy import symbols, cos, sin v0, a0, f0 = symbols('v0 a0 f0') v1, a1, f1 = symbols('v1 a1 f1') w, t = symbols('w t') g1 = v0 + a0 * w *
I have the following equation to calculate the boundary inductance in an electronic circuit. With SymPy, I can use Lb.evalf(subs={...}) to calculate Lb value when I have D, f and R. Lb = ((1-D)**2*D*R)/(2*f) Without having to re-arrange the equation,
I'm sure this is a really basic question, but I've googled and haven't found it. Supposed I have a vector in sympy z = 3*x + 4*y How do I compute the x-component of the vector (i.e. the 3)? z/x doesn't give it (there's still the y-part), nor does z[x
I'm trying to solve a set of coupled ODE's using odeint in python; I initially created the program to solve 3 specified equations (where I use sympy.subs for each value I knew was present), but now I wish to solve N many coupled ODE's. The issue I am
I found that if I have both sympy and numpy (EDIT: or IPython) installed (32-bit windows 7), then I can only run sympy through its isympy script file, e.g., from a git-bash console pushd /c/Python27/Lib/site-packages/sympy/bin python isympy limit(dif
I am trying to solve the following equation, def f(u1, u2, u3, u4, a11, a16, a12, a66, a26, a22): return a11*u4-2*a16*u3+(2*a12+a66)*u2-2*a26*u1+a22 where u1 to u4 are complex variables that I want the root for f() = 0 and a11 to a66 are arguments(fl
I am writing a program where users need to be able to use self written mathematical functions containing functions from numpy and scipy, eg. scipy.special.wofz(). These functions will be stored in files and imported as strings by the program. I looke
I have an equation like: R₂⋅V₁ + R₃⋅V₁ - R₃⋅V₂ i₁ = ───────────────────── R₁⋅R₂ + R₁⋅R₃ + R₂⋅R₃ defined and I'd like to split it into factors that include only single variable - in this case V1 and V2. So as a result I'd expect -R₃ (R₂ + R₃) i₁ = V₂⋅
I have a number of symbolic expressions in sympy, and I may come to realize that one of the coefficients is zero. I would think, perhaps because I am used to mathematica, that the following makes sense: from sympy import Symbol x = Symbol('x') y = Sy
I am coding a function that solves an arbitrary number of simultaneous equations. The number of equations is set by one of the parameters of the function and each equation is built from a number of symbols - as many symbols as there are equations. Th
I'm trying to solve a set of equations with SymPy 0.7.1: from sympy import * equations = [ Eq(S('vf'), S('vi + a*t')), Eq(S('d'), S('vi*t + 1/2*a*t**2')), Eq(S('a'), S('10')), Eq(S('d'), S('60')), Eq(S('vi'), S('5')) ] print solve(equations) produces