Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
0 votes

basically I have to simplify in Cadabra $\frac{1}{k.pk.(p+q) }+\frac{1}{k.qk.(p+q) }$ which is equal to $\frac{1}{k.p~~k.q }$

What I tried is

{c,f}::Indices;
m:=1/((p_{c}+q_{c})k_{c}*(q_{f})k_{f});
n:=1/((p_{c}+q_{c})k_{c}*(p_{f})k_{f});
w:= @(m) + @(n);
distribute(_);
substitute(_, $k_{c} p_{c} = kp, k_{c} q_{c} = kq$, repeat=True);
map_sympy(_, "together");

But it is showing an import error : No module named Sympy. What should i do to rectify the same

in General questions by (650 points)

1 Answer

0 votes
 
Best answer

You need to install the python 'sympy' module. On which system/distribution are you running this?

by (83.1k points)
selected by

debian jessie 8.9.. ihave installed the module sympy in my system

Cadabra uses python 3, are you sure you have installed it for that python version? When you launch python3, can you import sympy there?

Thanks..Now its working

...