Hi all,
I am just a new user for SymPy. I am self learning this library for my undergrauate research. But in the middle of the process I am stucked with one code.
So I have defined a function with a subscript.
U_n= x^n + 1/x^n
When I consider (U_1)^3 I get (substitute n=1)
(U_1)^3 = (x+1/x)^3
Then after simplifying this I get
(U_1)^3 = (x^3 + 1/x^3) + 3(x+ 1/x)
But one can see this answer as
(U_1)^3 = U_3 + 3U_1
How to get the output in terms of U_n 's ?
Can someone please give an idea how to build this code using SymPy. It would be a very big help for my research.
Thank you very much.
Gayanath Chandrasena.