#SymPy

2025-12-02

The hermite function f(x)=3x²-2x³ (basis of smoothstep) is a mix of the in and out easing of x²:

>>> a,b,x = symbols('a b x', real=True)
>>> mix = a*(1-x)+b*x
>>> f_in = x**2
>>> f_out = 1-f_in.subs({x:1-x})
>>> f_in_out = mix.subs({a:f_in, b:f_out, x:x}).simplify()
>>> f_out_in = mix.subs({a:f_out, b:f_in, x:x}).simplify()
>>> hermite = 3*x**2-2*x**3
>>> hermite.simplify() == f_in_out
True

#sympy #math #animation

The hermite function between 0 and 1 as seen from Desmos
2025-11-27

I just went mental for an hour with #sympy because I declared two symbols like that: n,t=symbols('t n')

I ended up with the most surprising #math identities ever...

2025-11-23
2025-11-05

Hello Mathstodon community.

I'm an independent researcher from a systems design background, and I'm exploring the geometry of a specific golden disphenoid I call 'ANNA'.

It's a Tetrahedron composed of 4 congruent 36-72-72 Golden Triangles.

My key finding is that it possesses a pair of opposite edges that are perfectly orthogonal.

To verify this beyond numerical approximation, I wrote a `sympy` script that defines the vertices symbolically using φ. The script computes the dot product of the opposite edge vectors, and `sympy.simplify()` reduces it to exactly 0.

My question: Is this orthogonality a known property of this solid? I'm posting the (short) symbolic script in the reply.

#math #geometry #goldenratio #sympy #python

2025-09-27

I was hoping to do a talk on computer assisted algebra with Python's Sympy at PyCon Ireland.

But this year it seems they can't cover the costs of tickets for speakers, or help with travel/accommodation.

That's a shame and I will have to forgo this opportunity :(

#python #maths #sympy

Intro to Symbolic Mathematics with Sympy - acceptance email.
Yann Büchau :nixos:nobodyinperson@fosstodon.org
2025-09-11

@hisold Citing a plain website or GitHub repo is kinda unprofessional. Many widespead software packages have a publication that is well citable, e.g. #sympy has this one with a proper DOI: doi.org/10.7717/peerj-cs.103, same for #numpy, #scipy, #matplotlib, etc. Some have at least a #Zenodo entry (with a DOI) to be properly citable. #PlatformIO apparently has none of those.

Dr. Chris Rackauckas :julia:chrisrackauckas@fosstodon.org
2025-05-29

Earn money working on open source software #oss! New project just posted: help make wrappers to connect Symbolics.jl to SymPy. $300 bounty. Information for signing up for the #SciML small grants program are contained in the link:

sciml.ai/small_grants/#create_

#julialang #python #symbolics #sympy #ode

SymPy in Julia is actually awesome! It feels more ergonomic to use in Pluto notebook than the native Python package does in Jupyter, which is the opposite of what I expected.

#Julia #JuliaLang #Pluto #math #SymPy

Screenshot of a Pluto notebook. Cells contain text and code, and outputs are rendered as LaTeX math.

Symbolic math with SymPy in Julia+Pluto

using SymPy
@syms x y a
eq1 = x^2 + y^2 ~ 1
eq2 = a*x - y ~ 1/sqrt(Sym(3)) * Rational(1, 3)
2025-04-22

Релятивистская трассировка лучей

В этой статье я покажу как можно самому, бесплатно и без смс, нарисовать черную дыру при помощи OpenGL, в полном соответствии с ОТО. Для этого, мы сначала выведем уравнения движения лучей света, напишем интегратор Рунге-Кутты на GLSL , и наконец, объединив одно с другим, получим фрагментный шейдер , который вычисляет путь лучей, отправленных из камеры назад во времени.

habr.com/ru/articles/903016/

#opengl #glsl #sympy #общая_теория_относительности #трассировка_лучей #численное_интегрирование

2025-04-08

It's been a long time since I tried #SymPy, but yesterday I went back to it to do some simple symbolic linear algebra, and I have to say it is pretty good these days.

The same project was also the first time I used #orgmode source blocks to insert generated output (from SymPy i this case) into a document. It took me a few times returning to the docs, but it is pretty nice for sharing calculations with fellow researchers.

2025-02-17

The interactive calculation sheet for #engineering, based on #emacs, #orgmode, #texlatex and #sympy is available in English [1], although the blog article is in German [2]. The template is also in English [3].

#Orgmode is so impressive, you could use #maxima, #octave, #gnuplot, #graphviz and almost 40 other languages with all their libraries right out of the box [4].

Have fun!

[1] vennemann-online.de/flossblog/
[2] vennemann-online.de/flossblog/
[3] vennemann-online.de/flossblog/
[4] orgmode.org/worg/org-contrib/b

A text page with a explanatory text, mathematical expressions and Gnu Emacs Org-mode code blocks in between.

I like to do math, small prototypes and other experimenting with Python in Jupyter notebooks. NumPy, SciPy, SymPy and Matplotlib have been very handy.

But recently Python was too slow for what I was doing and I had trouble juggling Numpy arrays like I often have (it is required for speed). I know some #Rust so I decided to give #evcxr a go because it has a Jupyter kernel. And omg, I wasn't disappointed! It was mindbogglingly fast compared to what I'm used to and it also made the hard part of my code way easier to get right.

However, I only needed math functions provided by std this time. Now I'm trying to figure out if there are science Rust libs that are convenient enough to replace most Python in my notebooks. I know it's a fragmented space, but maybe one could already gather a comprehensive collection of crates manually.

Any recommendations?

#RustLang #SciPy #NumPy #SymPy #SciComp #Math

End of a long Jupyter notebook cell in VSCodium with Rust code in it. Running it took 6.3s. The uncommented code that is visible is computing something in parallel using rayon:

x.par_iter_mut().enumerate().for_each(|(n, xn)| {
    let n = n as i32;
    for k in n-N+1..=n {
        *xn += a(k, lam, t1, t4, sr) 
            * (-lam/(sr as f64)*((n-k) as f64)).exp() 
            * (omega[k.max(0) as usize]/(sr as f64) 
            * ((n-k) as f64) 
            + phi[k.max(0) as usize]).cos();
    }
});
Rhett Allainrhettallain
2024-12-11

New video - building a 3D animation of a half-atwood with a spring using mechanics and (of course too)

youtu.be/wB_hs-Dhs3c

Nadiah Kristensennadiah@fediscience.org
2024-11-22

I recently read a paper by Kleshnina and others and used it to teach myself some evolutionary game theory techniques.

This is a little obscure, so I'll thread below about why this topic matters for humans and the environment 🧵

nadiah.org/2024/11/20/kleshnin

#GameTheory #PrisonersDilemma #iteratedGame #cooperation #EvolutionOfCooperation #Z3 #pyeda #networkx #sympy #SageMath #sustainability

2024-11-12

Roots of parametric polynomials.
Made with #python, #matplotlib, #numpy and #sympy
The first or the second?

2024-11-05

A math problem:

Variables: a, b, c, d, e.
Values: 2, 5, 13, 14, 15.
Constraints:
1. a is a multiple of b.
2. d is a factor of a.
3. e - b = c.
Which variable holds which value?
I can't find the solution.

Today's math problem courtesy of a 12 year old upset with his "unsolvable" homework. I'm stumbled too.

Can #sympy be wrangled to solve this sort of problems? Can't see where to limit the values each variable can take.

Yazılım Teknisyeniyazilim
2024-11-03

to solutions in

Photoshop:
Illustrator:
PremierePro:
Office:
Maya:
Media:
Unity:
ToonBoom:
InDesign:
Nuke:
Procreate:
After Effects:
Mathematica:
MatLab:
Audition:
Autocad:
Ableton: (daily build)
Lightroom: ,

And more...

Eugenia Leugenialoli
2024-11-03

to solutions:

Windows:
Photoshop: 3.0-rc
Illustrator:
PremierePro: ,
Office/Acrobat: ,
Maya:
Media:
Unity:
ToonBoom: ,
InDesign:
Nuke:
Procreate:
After Effects:
Mathematica: ,
MatLab:
Audition:
Autocad: ,
Ableton: , (daily build)
Lightroom: ,

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst