MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Separating a time function

  • To: mathgroup at
  • Subject: [mg130660] Separating a time function
  • From: at
  • Date: Tue, 30 Apr 2013 04:19:45 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:

Solving some wave propagation problems I get a separable solution 

    F(space,time) = f(space)*g(time)

The solution F is symbolic, and intermixes f and g. To separate the time
dependence out I wrote the SeparateFunctionOfTime module listed below.
The test script following the module tries 6 combinations. It works fine
when g is real, but in the last test it returns Sqrt[2]*Abs[Sin[t]]*(4*I + 3*Cot[t])
instead of (3 Cos[t]+4 I*Sin[t])]. How can I get Simplify (or FullSimplify)
inside SeparateFunctionOfTime to get rid of that Abs?

(Test performed with version 5.2 on a Mac Pro.  Have not tried it
yet under v 9.0 on my laptop)

  g=  Simplify[Exp[g2]]; g=FullSimplify[g,t\[Element]Reals];

Print["sep time function=",SeparateFunctionOfTime[f,t]//InputForm];
Print["sep time function=",SeparateFunctionOfTime[f,t]//InputForm];
Print["sep time function=",SeparateFunctionOfTime[f,t]//InputForm];
Print["sep time function=",SeparateFunctionOfTime[f,t]//InputForm];
f=Expand[(a0+a1*x+a2*x^2)*(3 Cos[t]+4 I*Sin[t])];
Print["sep time function=",SeparateFunctionOfTime[f,t]//InputForm];

sep time function=b0 + t*(b1 + b2*t) + t^3*Sign[t]
sep time function=b0 + t*(b1 + b2*E^t*t)
sep time function=b0 + b1*t + b2*Log[t]
sep time function=c0 + c1*Cos[omega*t] + c2*Sin[omega*t]
sep time function=Sqrt[2]*Abs[Sin[t]]*(4*I + 3*Cot[t])

  • Prev by Date: Does Wolfram Alpha Pro support all of the functionality of Mathematica
  • Next by Date: Problems with Importing and JLink
  • Previous by thread: Does Wolfram Alpha Pro support all of the functionality of Mathematica
  • Next by thread: Problems with Importing and JLink