Category "sympy"

Sympy evaluates integral sign wrong

For an integral calculation, Sympy evaluates the same result as me and wolframalpha with a negative sign. The integral I am evaluating is strictly positive so i

How to remove brackets in a reticulate output in R/exams?

I have the following single-choice exercise RadicalPrimo.Rmd, which is intended to simplify square roots: ```{r data generation, echo = FALSE, results = "hide"}

Create indexed functions in sympy

Is it possible to create indexed functions in sympy like fi(t) which might be used in a product or sum, eg Σfi(t)? import sympy as sp f = sp.Function('f')

Extract coefficients and corresponding monomials from a given polynomial in SymPy

Given a symbolic multivariate polynomial P, I need to extract both its coefficients and corresponding monomials as lists: def poly_decomp(P): .... retu

Is there any way to get the step-by-step solution in SymPy?

Is there any way to get the step-by-step solution in SymPy? For example: x**2-5 = 4 step 1 x**2-5+5=4+5 step 2 : x**2=9 step 3 :x = 3 or x= -3

Solving coupled differential equations with sympy

I am trying to solve the following system of first order coupled differential equations: - dR/dt=k2*Y(t)-k1*R(t)*L(t)+k4*X(t)-k3*R(t)*I(t) - dL/dt=k2*Y(t)-k1*

How can I determine whether a line segment is completely covered by a set of smaller segments?

I am trying to write an algorithm using turtle. The turtle is bouncing in a polygon, and painting a portion of the edge it touches. The algorithm should termina

How to define a lot of symbols in SymPy

I am trying to define a lot of variables in "sympy" for symbolic processing. import sympy as sp b_0 = sp.symbols('b_0') b_1 = sp.symbols('b_1') ... b_X = sp.sy

matrix multiply elementwise

Is it possible to do from matrix_multiply_elementwise in sympy library with more than two matrices? Or any other way for multiplying couple of matrices elementw

Problem solving differential equations using odeint and sympy

I am trying to solve and display a graph of the following equation: f'=af²-bf Therefore I have tried to use scipy.integrate.odeint library function to so