Ask Your Question

Set a REAL function in SAGE

asked 2019-03-18 04:31:18 +0100

Karim gravatar image

updated 2019-03-18 07:19:33 +0100

vdelecroix gravatar image

Hello everyone,

I have a problem when I was trying to set my function H(t) as real.

image description

H = function('H')(t)

=> False


=> \bar{H}

I wanna set my function in real space and the code stop printing \bar{H] as you seen in the screen shot.

Thanks for the help. Cheers.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2019-03-18 19:16:58 +0100

rburing gravatar image

A simple alternative to 'setting it to be real' is to make a substitution such as this one:

whatever.subs({conjugate(H) : H, real_part(H) : H, imag_part(H) : 0})

It depends on what kind of expressions you want to get rid of.

edit flag offensive delete link more

answered 2019-03-18 14:37:59 +0100

Emmanuel Charpentier gravatar image

This appears to be unsupported in either Sage or Maxima. Implementing this seems to be no small beer.

You may try to discuss this on sage-devel...

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2019-03-18 04:31:18 +0100

Seen: 97 times

Last updated: Mar 18 '19