Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How do i specify (temporary) values for variables?

I have a longer symbolic calculation with several variables, e.g.:

var('x d_k d_e d_m r Q e e_Ersatz e_m e_s')

p = 1/(4pie)*Q/r

e_Ersatz = d_k * ( (e_m/d_m) + (e_s/(d_k-d_m) ) )

p_4 = p(e = e_Ersatz, Q = 1, r = sqrt((2*d_k)^2+(d_e -x)^2))

show(p_4.plot(x))

Now i want to plot p_4 in respect to x, and specify temporary numerical values for d_k d_e d_m r Q e e_Ersatz e_m e_s, to see how that function looks for some example values. But how do I give numeric values for variables at this point? I would like to continue the symbolic calculations after that. Apparently it would work if I specified values for the variables in the beginning, but i am really interested in the symbolic solution to this problem.

How do i specify (temporary) values for variables?

I have a longer symbolic calculation with several variables, e.g.:

var('x d_k d_e d_m r Q e e_Ersatz e_m e_s')

e_s')

p = 1/(4pie)*Q/r

1/(4*pi*e)*Q/r

e_Ersatz = d_k * ( (e_m/d_m) + (e_s/(d_k-d_m) ) )

)

p_4 = p(e = e_Ersatz, Q = 1, r = sqrt((2*d_k)^2+(d_e -x)^2))

-x)^2))

show(p_4.plot(x))

show(p_4.plot(x))

Now i want to plot p_4 in respect to x, and specify temporary numerical values for d_k d_e d_m r Q e e_Ersatz e_m e_s, to see how that function looks for some example values. But how do I give numeric values for variables at this point? I would like to continue the symbolic calculations after that. Apparently it would work if I specified values for the variables in the beginning, but i am really interested in the symbolic solution to this problem.