I have an equation for q(x) and I want to find v(x) and M(x) in each plane, then add them vectorwise and plot them. I can't even get them to plot correctly,
from sympy import symbols, integrate, sqrt, lambdify, Heaviside, SingularityFunction
import sympy as sp
from sympy.abc import x, a, n
from numpy import linspace
import matplotlib.pyplot as plt
Q = (
-450.37 * SingularityFunction(x, 0, 1)
+ 909.92 * SingularityFunction(x, 0.114, 1)
+ 454.96 * SingularityFunction(x, 0.170, 1)
- 914.51 * SingularityFunction(x, 0.198, 1)
+ 19193.2 * SingularityFunction(x, 0.114, -2)
- 19193.2 * SingularityFunction(x, 0.170, -2)
)
V = integrate(Q)
M = integrate(V)
print(V)
print(M)
V_func = lambdify(x, V, "numpy")
x = linspace(0, 0.198, 500)
V_plot = V_func(x)
plt.plot(x, V_plot)
plt.show()
This is what I have so far, I can't even get it eval at a point I just get the equation back without the x's plugged in any help would be appreciated.