Ask Your Question
0

Integration and differentiation symbols

asked 2017-02-02 14:15:53 +0100

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?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-02-02 15:48:30 +0100

ndomes gravatar image

updated 2017-02-02 15:55:30 +0100

You can use latex. $ \int $ --> $ \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:

$ \int x \cos\left(x^{2}\right) dx = \frac{1}{2} \sin\left(x^{2}\right) $

edit flag offensive delete link more

Comments

you could try to use

%display text unicode_art
FrédéricC gravatar imageFrédéricC ( 2017-02-02 20:16:39 +0100 )edit

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: 2017-02-02 14:15:53 +0100

Seen: 3,904 times

Last updated: Feb 02 '17