0
$\begingroup$

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.

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

1 Answer 1

2
$\begingroup$

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)  *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.