Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Sorry I have changed your function (but I thinks it is not the problem). You must usee a dictionary to reuse the result

a=3
var('x')
eq1 = x+a==0
sol=solve([eq1],x,solution_dict=True)
x_sol=sol[0][x]
show(LatexExpr(r"x\_sol="+latex(x_sol)))
f(x)=7*x +10
show(LatexExpr(r"f(x\_sol)="+latex(f(x_sol))))

Sorry I have changed your function (but I thinks it is not the problem). You must usee use a dictionary to reuse the result

a=3
var('x')
eq1 = x+a==0
sol=solve([eq1],x,solution_dict=True)
x_sol=sol[0][x]
show(LatexExpr(r"x\_sol="+latex(x_sol)))
f(x)=7*x +10
show(LatexExpr(r"f(x\_sol)="+latex(f(x_sol))))

Sorry I have changed your function (but I thinks it is not the problem). You must use a dictionary to reuse the result

a=3
var('x')
eq1 = x+a==0
sol=solve([eq1],x,solution_dict=True)
x_sol=sol[0][x]
show(LatexExpr(r"x\_sol="+latex(x_sol)))
f(x)=7*x f(x)=5*x +10
show(LatexExpr(r"f(x\_sol)="+latex(f(x_sol))))