Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

An error using unicode?

Following the short answer of "Automatic substitution of unicode characters", the following code works nicely

%display unicode_art
π = var('pi')
solu=solve(π^2 - π==0, π)   
solu

But if this code works nicely too

var("w0, pi, D, I")
A = matrix(SR, 2, 2, [[w0, 1],[w0-pi,1]])
y = vector([w0-D, w0-D-pi+I])
sol=A.solve_right(y)
%display unicode_art
sola=sol[0].full_simplify().function(D, pi, I, w0)
solb=sol[1].full_simplify().function(D, pi, I, w0)
f(x, D, π, I, w0)=sola*x + solb
f(x, D, π, I, w0)

The use of unicode on the preceding code generates an error

%display unicode_art
π = var('pi')
var("w0, π, D, I")
A = matrix(SR, 2, 2, [[w0, 1],[w0-π,1]])
y = vector([w0-D, w0-D-π+I])
sol=A.solve_right(y)
sola=sol[0].full_simplify().function(D, π, I, w0)
solb=sol[1].full_simplify().function(D, π, I, w0)
f(x, D, π, I, w0)=sola*x + solb