# Why won't ComplexExpand remove Abs from my function, how can I do this?

These are my inputs and the resulting output:

r1[t] := {x1[t], y1[t]}
r2[t] := {x2[t], y2[t]}
v1[t] := D[r1[t], t]
v2[t] := D[r2[t], t]
vCM := (v1[t] + v2[t])/2

Irod := 1/12 m (5 b)^2

T1[t] = FullSimplify[ComplexExpand[1/2 m Norm[vCM[t]]^2]]
(* 1/2 m Abs[{1/2 (Derivative[1][x1][t] + Derivative[1][x2][t]),
1/2 (Derivative[1][y1][t] + Derivative[1][y2][t])}[t]]^2 *)


I'd want to know how I can remove the Abs[...] from the final result.

• @corey979 when do you need to use underscore _ when defining functions? Nov 14, 2016 at 19:15
• Could specifiy TargetFunctions->{Re,Im} to ComplexExpand. That way it will work to avoid Abs, Arg, Sign, and Conjugate. Nov 14, 2016 at 19:15

You should use the Blank pattern object in your function definitions

r1[t_] := {x1[t], y1[t]}
r2[t_] := {x2[t], y2[t]}
v1[t_] := D[r1[t], t]
v2[t_] := D[r2[t], t]
vCM[t_] := (v1[t] + v2[t])/2

FullSimplify[ComplexExpand[1/2 m Norm[vCM[t]]^2]]

(*  1/8 m ((Derivative[1][x1][t] +
Derivative[1][x2][t])^2 + (Derivative[1][y1][t] +
Derivative[1][y2][t])^2)  *)