plotting: value error variable not found
Hi, I'm new to sage and hope that anybody can help me.
I tried to plot two functions X1 and X2 which both depend on several parameters (k, j0, j1, jMax, a0, aMax, a1, v0, v1, vMax, x). I chose a value for every variable except for vMax because I wantet to plot X1 and X2 as a function of vMax. So I typed
plot(X1(k=5, j0=2, j1=4, jMax=10, a0=5, aMax=20, a1=3, v0=10, v1=100, vMax=vMax, x=2000), (vMax, 0, 200))
and it worked just fine. I wanted to do exactely the same with funktion X2, but then I got an value error:
sage: plot(X2(k=5, j0=2, j1=4, jMax=10, a0=5, aMax=20, a1=3, v0=10, v1=100, vMax=vMax, x=2000), (vMax, 0, 200))
Traceback (click to the left of this block for traceback)
...
ValueError: Variable 'vMax' not found
I don't know, why vMax is not found, as the function is definitely dependent of it. Moreover, with function X1 it just worked as expected!
Yeah, sure, I should add some more details.
I constructed X1 and X2 recursively as they are the way X, which is the integral of the acceleration a, which is the integral of the velocity v and so on. In the end, I get
X1(k, j0, j1, a0, aMax, a1, v0, v1, vMax, x) = -1/24*(j0 -
jMax)^4/k^3 + 1/6*(j0 - jMax)^3*j0/k^3 + 1/24*jMax^4/k^3 - 1/2*a0*(j0 -
jMax)^2/k^2 - 1/2*aMax*jMax^2/k^2 + (j0 - jMax)*v0/k - jMax*vMax*/k + x +
1/48*((2*a0 - 2*aMax + jMax^2/k - (j0^2 - jMax^2)/k)^3*k^2/jMax^2 +
24*(2*a0 - 2*aMax + jMax^2/k - (j0^2 - jMax^2)/k)*k^2*v0/jMax -
3*(2*a0*k^2 - (j0^2 - jMax^2)*k)*(2*a0 - 2*aMax + jMax^2/k - (j0^2 -
jMax^2)/k)^2/jMax^2 + 4*(2*j0^3 - 3*j0^2*jMax + jMax^3 - 6*(a0*j0 -
a0*jMax)*k)*(2*a0 - 2*aMax + jMax^2/k - (j0^2 - jMax^2)/k)/jMax)/k^2 -
1/48*((2*a1 - 2*aMax + jMax^2/k - (j1^2 - jMax^2)/k)^3*k^2/jMax^2 -
24*(2*a1 - 2*aMax + jMax^2/k - (j1^2 - jMax^2)/k)*k^2*vMax/jMax -
3*(jMax^2*k - 2*aMax*k^2)*(2*a1 - 2*aMax + jMax^2/k - (j1^2 -
jMax^2)/k)^2/jMax^2 + 4*(jMax^3 - 6*aMax*jMax*k)*(2*a1 - 2*aMax +
jMax^2/k - (j1^2 - jMax^2)/k)/jMax)/k^2 - 1/24*((j1 + jMax)^4*jMax/k -
4*(j1 + jMax)^3*jMax^2/k + 24*(j1 + jMax)*jMax*k*vMax + 6*(2*a1*jMax*k^2
- (j1^2*jMax - jMax^3)*k)*(j1 + jMax)^2/k^2 - (3*j1^4 - 6*j1^2*jMax^2 ...
You shoud provide more details on what you typed, in particular on how you constructed X1, X2.