# Question:Using RootOf with polynomials and coeffs

## Question:Using RootOf with polynomials and coeffs

Maple 2015

I have a complicated expression which includes RootOf( a quadratic ) but holds for all x what i'd like to do is turn it into a polynomial in x[1], x[2], x[3] so i can start looking at the monomial coefficients.

k[a1]*((x[1]+x[3])*k[d1]+C[T]*k[m])*(R[b]-x[1]-2*x[2])/((R[b]+R[m]-x[1]-2*x[2]-x[3])*k[a1]+k[m])-k[d1]*x[1]-k[a2]*x[1]*(R[b]-x[1]-2*x[2])+2*k[d2]*x[2] = (-R[b]*k[a2]+2*k[a2]*x[1]+2*k[a2]*x[2])*(k[a1]*kh[m]*((x[1]+x[3])*k[d1]+C[T]*k[m])*(R[b]+R[m]-Rh[m]-x[1]-2*x[2])/(k[m]*((R[b]+R[m]-x[1]-2*x[2]-x[3])*k[a1]*kh[m]/k[m]+kh[m]))-k[d1]*x[1]-kh[a2]*x[1]*(R[b]+R[m]-Rh[m]-x[1]-2*x[2])+2*kh[d2]*x[2])/(2*kh[a2]*RootOf(kh[a2]*_Z^2+(-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])*_Z-2*k[a2]*x[1]*x[2]-k[a2]*x[1]^2+k[a2]*x[1]*R[b]+2*kh[d2]*x[2]-2*k[d2]*x[2])-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])+(-2*kh[a2]*RootOf(kh[a2]*_Z^2+(-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])*_Z-2*k[a2]*x[1]*x[2]-k[a2]*x[1]^2+k[a2]*x[1]*R[b]+2*kh[d2]*x[2]-2*k[d2]*x[2])+2*k[a2]*x[1]+2*k[d2]-2*kh[d2])*(kh[a2]*x[1]*(R[b]+R[m]-Rh[m]-x[1]-2*x[2])-2*kh[d2]*x[2])/(2*kh[a2]*RootOf(kh[a2]*_Z^2+(-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])*_Z-2*k[a2]*x[1]*x[2]-k[a2]*x[1]^2+k[a2]*x[1]*R[b]+2*kh[d2]*x[2]-2*k[d2]*x[2])-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])

If this were something like q(x)=p1(x)/sqrt(p2(x)) where p1 and p2 are polynomials and q is a quotient- this would be as simple as making sqrt(p2(x)) the subject and squaring both sides, and then movinbg everything onto one and multiplying out denominators. However RootOf is something I'm not used to manipulating.

Is there anyway of converting this expression to a polynomial using maple commands?

﻿