Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

problem with conjugate() of a function

Hi i want to decompose a rational fraction in partial faction

//define variable of problem
C_1 = var('C_1', domain="real")
C_2 = var('C_2', domain="real")
L_1 = var('L_1', domain="real")
omega = var('omega', domain="real")
R_1 = var('R_1', domain="real")
Amp = var('Amp', domain="real")
t = var('t', domain="positive")
p = var('p', domain="complex")
Z_1 = ((L_1*p + 1/(C_1*p))*(1/(C_2*p)))/((1/(C_2*p)) + ((L_1*p + 1/(C_1*p))))
F = (R_1/(R_1 + Z_1)).full_simplify()
U = omega/((omega^2 + p^2)*p)
f = (F*U)
denf = f.denominator()
numf = f.numerator()
polef=[]
BuffSol = solve(denf==0, p, solution_dict=True)//find pole of function
for s in BuffSol:
    polef.append(s[p])
valpolef=[]
for n in range(0,len(polef)):
    valpolef.append(polef[n](C_1=6*10^-15, C_2 = 3*10^-12, L_1 = 4.2217,R_1 = 1000,omega=2*pi*1000000).n(digits=25))//print the numerical approx of pole with value of the problem

I am almost certain of polef[0] is the conjugate of polef[2] to verify this i have print polef[0](C_1=6*10^-15, C_2 = 3*10^-12, L_1 = 4.2217,R_1 = 1000,omega=2*pi*1000000).n() and polef[0].conjugate()(C_1=6*10^-15, C_2 = 3*10^-12, L_1 = 4.2217,R_1 = 1000,omega=2*pi*1000000).n(), but the real part of this expression is differently. Where i have make a mistake in my code ?

thank you in advance :)