Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
0

Integration and differentiation symbols

asked 8 years ago

NT4MAXIMUSD gravatar image

I have seen this in the examples but it doesn't appear to be very easy unless I am totally missing something. It is important that the proper symbology be used in presentation form to show the integration symbol and or differentiation symbol. But can't seem to find any way of doing it . This should be straight forward like show(integral()) and it puts the integral symbol on the screen especially in showing symbolic calculations.

How do you get the symbols on the screen?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 8 years ago

ndomes gravatar image

updated 8 years ago

You can use latex. $ \int $ -->

def my_int_print(expr, show_constant=False):  
    if show_constant:
        pretty_print(html("$ \int %s \,dx = %s + C ; \\ C \in \Bold R $" %(latex(expr),latex(integral(expr,x)))))
    else:
        pretty_print(html("$ \int %s \,dx = %s $" %(latex(expr),latex(integral(expr,x)))))

my_int_print(x*cos(x^2))

Returns something similar to:

xcos(x2)dx=12sin(x2)

Preview: (hide)
link

Comments

you could try to use

%display text unicode_art
FrédéricC gravatar imageFrédéricC ( 8 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 8 years ago

Seen: 3,974 times

Last updated: Feb 02 '17