# [SOLVED] Complex Stiffness Solution

• October 9th 2009, 10:49 AM
jfortiv
[SOLVED] Complex Stiffness Solution
Hi,

I'm trying to solve a differential equation of a 1 degree of freedom mechanical system with a complex stiffness:

m*d^2u/dt^2 + k*u = A*e^(i*w*t), where k is complex (k = a + i*b), i = sqrt(-1)

First, I assume a solution for u of the form u = u_mag*e^(r*t), thus d^2u/dt^2 = r^2*u_mag*e^(r*t), and I use this to solve the homogeneous equation, getting the characteristic equation for r:

m*r^2 + k = 0

Solving for r yields:

r = +/- sqrt(-k/m) = +/- sqrt( - ( a+ i*b) / m) = +/- i * sqrt(a/m + i*b/m)

So u = u_mag * e^( i * sqrt(a/m + i*b/m))

or

u = u_mag * e^(- i * sqrt(a/m + i*b/m))

At this point I am stuck. I want to use Euler's formula to rewrite u in terms of sin and cos, but I can't isolate the real and imaginary terms in the exponent, such as in the following form to which I am accustomed:

e^(s + i*t) = e^(s) * e^(i*t)

Can someone offer some insight or point out the error of my methodology?

Thanks.
• October 9th 2009, 02:06 PM
shawsend
If I write it as:

$(D^2+\frac{k}{m})u=\frac{a}{m} e^{i\omega t}$

and apply the operator $(D^2+w^2)$ to both sides to annihilate the right side, and work through it, I get:

$u(t)=c_1 e^{i\sqrt{\frac{k}{m}} t}+c_2 e^{-i\sqrt{\frac{k}{m}}t}+\frac{a}{k-m\omega^2} e^{i\omega t}$.

In general if $k\in\mathbb{C}$ then:

$\displaystyle{

however, the solution above already contains both roots of the square root so that in the solution, $\sqrt{\frac{k}{m}}=r^{1/2}e^{\frac{i}{2}\theta}$, the principal value.

Also, if you're into Mathematica, here's the code to study a particular IVP numerically:

$u''+(1-\frac{i}{2})u=-\frac{1}{2}e^{it},\quad u(0)=1+i,\quad u'(0)=2-i$

Code:

eqn = Derivative[2][u][t] + (k/m)*u[t] ==     (a/m)*Exp[I*w*t] //. {k -> 2 - I,     m -> 2, w -> 1, a -> -1} sol = NDSolve[{eqn, u[0] == 1 + I,     Derivative[1][u][0] == 2 - I}, u,   {t, 0, 5}] p1 = Plot[{Re[Evaluate[u[t] /. sol]],     Im[Evaluate[u[t] /. sol]]},   {t, 0, 5}, PlotStyle -> {Red, Blue}]
And then the code to solve for the two constants and plot the analytic solution:

Code:

clist = First[{c1, c2} /. FullSimplify[     Solve[{c1 + c2 + a/(k - m*w^2) == u,         c1*I*Sqrt[k/m] - c2*I*Sqrt[k/m] +           (I*w*a)/(k - m*w^2) == v},       {c1, c2}] //. {k -> 2 - I, m -> 2,       w -> 1, a -> -1, u -> 1 + I,       v -> 2 - I}]] solution = k1*Exp[I*Sqrt[k/m]*t] +     k2*Exp[(-I)*Sqrt[k/m]*t] +     (a/(k - m*w^2))*Exp[I*w*t] /.   {k -> 2 - I, m -> 2, w -> 1, a -> -1,     k1 -> clist[[1]], k2 -> clist[[2]]} p2 = Plot[{Re[solution], Im[solution]},   {t, 0, 5}, PlotRange ->     {{0, 5}, {-3, 3}}, PlotStyle ->     {Red, Blue}] Show[{p1, p2}]
and then plots of the real component of the solution in red and complex component in blue (pretty neat I think-- I never worked one like this before :)):
• November 5th 2009, 05:16 AM
jfortiv
Thanks for helping with this. I worked through your math. I never would have thought to apply an operator like that to both sides.

As it turns out, it doesn't make sense to use an imaginary stiffness in a time-domain solution. It's only applicable to frequency-domain. It was an interesting mathematical exercise anyway.

Thanks!