Wikipedia:Reference desk/Archives/Mathematics/2011 September 26

= September 26 =

A bit on  the  Heavi  Side
I have  a  problem  to  do  with  a  differential  equation  involving  a  Heaviside  Function. It goes  :$$\frac{d^2y}{dt^2} +  4y  =   ($$ ){sin t, 0 ≤ t < 2π ; 0, 2π ≤ t }  y(0) = 0, y'(0) = 0

I have  got  it  down  to  y(s)  =     (1 -  e^(-2πs))/(s^2+ 1)(s^2+ 4 )      =       1/3(s^2+ 1)     -     1/3(s^2+ 4)      -     ( e^(-2πs))/3(s^2+ 1)     +    ( e^(-2πs))/3(s^2+ 4)        ,  but  now  I  do  not  know  how  to  convert  the  exponential  terms  into  funπctions  of  t,  while  I  know  the  ones  without  the  exponentials  are  variants  of  sin(t). If anyone knows  how  to  work  this  out,  then  I  would  be  pleased  to  hear  that. Thank You. Chris the Russian Christopher Lilly  07:18, 26 September 2011 (UTC)
 * It appears you are trying to do this with Laplace transforms. (There are other ways.) An exponential factor in the s domain corresponds to a shift operation in the t domain; search for "Frequency shifting" in the Laplace transforms article. So basically just find the inverse transform without the exponential factor and then shift the function to the right by 2π. In the solution I got, y is 0 for y>2π so the shifted components should cancel out the non-shifted ones except on the interval [0,2π].--RDBury (talk) 13:08, 26 September 2011 (UTC)

Thank You. I hope  I  made  this  clear  that  that  which  is  in  the  curly brackets  was  a  step  function,  but  I  suppose  that  is  obvious  with  the  title  Heaviside. I wondered  why  sin ( t - 2π )  should  be  any  different  from  sin (t)  itself. If I  took  the  equation  to  be  $$\frac{d^2y}{dt^2} +  4y  =  sin t  $$      on  its  own,  I can  work  that  out,  but  to  be  honest,  I  could  not  understand  how  a  function  could  change  like  symbolically. I get  the  graph,  like  a  switch  or  something  going  on,  then  all  of  a sudden  the  value  of  some  function  jumps  or  suddenly  appears  different, but it  still  seems  hard  to  fathom.

I do  have  a  different  problem  involving  an  integro differential equation. It goes :



\frac{d}{dt}y(t) + \int_{0}^t f(u)\,du = sin (t), \qquad y(0) = 1, \qquad \frac{d}{dt}y(0) = 0 $$

Now I  was  advised  that  the  assumption  is  that  $$ y = f(t) $$,  and  to  isolate  the  integral  by  rearranging  the  equation,  such  that  I  got  :



\frac{d}{dt}y(t) - sin (t) = \int_{0}^t f(u)\,du $$

Next I  was  told  to  take  the  derivative  of  both  sides,  and  was  told  that  this  meant  that since



\int_{0}^t f(u)\,du = \frac{d}{dt}y(t) - sin (t) $$

that



y = \cos (t) - \frac{d^2y}{dt^2} $$

But when  I  carry  out  the  integration  on $$ \int_{0}^t f(u)\,du $$,  according  to  the  Fundamental  Theorem  of  Arithmetic,  I  get :   $$\int_0^t f(u)\, du = f(t)-f(0).$$, or have  I  done  the  wrong  thing,  since  I  thought  that  taking  the  derivative  of  an  integral  is  where  they cancel  each  other  out. But also,  if  it  is  assumed  that
 * $$ y = f(t) $$, what  is
 * $$ f(u) $$ ?

If I  assume  that,  then  I  think  I  get  $$ y - 1  = \cos (t) - \frac{d^2y}{dt^2}  $$ since if   $$ y = f(t) $$, then  $$ f(0) = y(0) = 1 $$,   as  stated  to  begin  with. If I  do  say  that  $$  y = \cos (t) - \frac{d^2y}{dt^2}  $$,  this  seems  correct,  since  it  says  that   $$ y(0) = 1 $$,  and  indeed   $$  y(0) = \cos (0) - \frac{d^2y(0)}{dt^2}  $$, and  since  if  \qquad \frac{d}{dt}y(0) = 0,  being  the  first  derivative,  so  will  be  the  second,  since  that  will  just  be  the  derivative  of  zero,  so  this  seems  right.

To solve   this,  I  tried  LaPlace  once  more,  and  got $$ y = \cos (t) - \frac{d^2y}{dt^2}  $$  implies  that  $$ \cos (t)  = y + \frac{d^2y}{dt^2}  $$, so  that Laplace of  $$ \cos (t)$$  = Laplace of $$ y + \frac{d^2y}{dt^2}  $$, which means  after  carrying  out  all  the  steps  that  $$ \y (s)  $$  =  s/(s^2 + 1 )^2   + s/(s+1), which  I  thought  was  cos(t) + t sin(t),  but  it  does  not  seem  to work when I check it. I certainly would appreciate any help on this, thank You. Chris the Russian Christopher Lilly  07:24, 27 September 2011 (UTC)

Trig identity and complex numbers.
I tried applying the following trig identity $$a \cos bx + c \sin bx = \sqrt{a^2+c^2}\sin\left(bx + \arctan\left(\dfrac{c}{b}\right)\right)$$ to the right hand side of Euler's Formula $$e^{ix}=\cos x + i \sin x$$. Interestingly, one gets $$e^{ix}=\sqrt{1^2+i^2}\sin\left(x+\arctan i\right)$$, but simplifying the square root gives $$e^{ix}=\sqrt{0}\sin\left(x+\arcsin i\right)$$, which can't be true. Any insight as to why this identity fails here? I also found through wolframalpha.com that $$\arctan i = i \infty$$. It almost seems as if it's trying to "cancel out" the zero with an infinity, though doesn't really make complete sense since it's composed inside another function. — Trevor K. — 16:55, 26 September 2011 (UTC)  — Preceding unsigned comment added by Yakeyglee (talk • contribs)
 * In your identity $$a \cos bx + c \sin bx = \sqrt{a^2+c^2}\sin\left(bx + \arctan\left(\dfrac{c}{b}\right)\right)$$ substitute a=b=1, c=0 to get $$\cos x = \sin(x + \arctan(0))$$ which is not true. Bo Jacoby (talk) 17:20, 26 September 2011 (UTC).
 * As Bo points out, your formula is a bit off. See List of trigonometric identities for the right identity. But the question still stands: why does that one still seemingly fail? If you work through a proof of the identity, you'll see that you end up dividing by zero at some point. So, strictly speaking, the identity should come with a disclaimer about what values of a and b are allowed. Your comment about the zero and infinity "trying to cancel each other out" is on the right track: see L'Hopital's_rule. 130.76.64.109 (talk) 18:02, 26 September 2011 (UTC)
 * The L'Hopital part could have been true, but I don't think that's what happening here. Take $$a=b=1,\ c=i/2$$, then you have the same mess with the arctan, but without the multiplication by 0. -- Meni Rosenfeld (talk) 18:26, 26 September 2011 (UTC)
 * [ec] Should be $$a \cos bx + c \sin bx = \sqrt{a^2+c^2}\sin\left(bx + \arctan\left(\dfrac{a}{c}\right)\right)$$ (note argument of arctan). But that's not the problem. The problem is that some identities developed for real numbers only work because we have sloppily assumed that squares are always nonnegative (in particular, wherever the square root symbol appears it should raise red flags with regards to extension to complex numbers. With complex numbers you also need to worry about branches and stuff). The generalization of squaring in its capacity as something nonnegative to real matrices is $$A^TA$$ and to complex numbers is $$z\bar{z}=|z|^2$$. If some version of the identity works for complex numbers, I'll bet it involves the factor $$\sqrt{|a|^2+|c|^2}$$. -- Meni Rosenfeld (talk) 18:12, 26 September 2011 (UTC)
 * That equation still doesn't work with a=0, c=-1. Probably the most concise formula that actually works uses the atan2 function.--RDBury (talk) 19:34, 26 September 2011 (UTC)
 * It's true that complex numbers sometimes break the rules we learned with real numbers, Meni, but this one does work (assuming you mind the quadrants, as RDBury points out). 130.76.64.119 (talk) 21:27, 26 September 2011 (UTC)

It's easier to see what is going on here, if you approach this using complex numbers from the start (trigonometry shouldn't be taught before complex numbers). For real a and b, we have:

a cos(x) + b sin(x) =

a/2 [exp(i x) + exp(-i x)] + b/(2i) [exp(i x) - exp(-i x)] =

(a - b i)/2 exp(i x) + (a + bi)/2 exp(-i x) =


 * a + b i| cos(x + phi)

So, the trig identity works because you have an expression involving exp(i x) and exp(-ix). While they are multiplied by complex numbers of equal modulus, you can generalize it. For arbitrary a and b not equal to zero, we can write:

a exp(i x) + b exp(-i x) =

a exp[i (x + p) - i p] + b exp[-i (x+p) + i p] =

a exp(-ip) exp[i(x+p)] + b exp(i p) exp[-i (x+p)]

You then choose p such that


 * a exp(-ip)| = |b exp(i p)|

If |a| is not the same as |b|, then we can't choose p real, but that's not a problem. We can always choose p = 1/(2 i) Log(a/b) to make both coefficients equal, but of course, both a and b have to be nonzero.

The fundamental issue here is that if you only have exp(i x), you can't magically get exp(-ix) out of nowhere. Count Iblis (talk) 21:49, 26 September 2011 (UTC)
 * What do you mean? Just compute $$e^{-ix}=\frac 1 {e^{ix}}$$. Bo Jacoby (talk) 07:37, 27 September 2011 (UTC).