Re: Solving for Stiffness using a plot
- To: mathgroup at smc.vnet.net
- Subject: [mg99971] Re: Solving for Stiffness using a plot
- From: dh <dh at metrohm.com>
- Date: Wed, 20 May 2009 05:02:43 -0400 (EDT)
- References: <guu2cm$65p$1@smc.vnet.net>
Hello,
your problem is not well posed. As you write it, k is a function of the
difference of x1 and x2: k[x1[t]-x2[t]].
But you only give equations for x1 and x2, your system is under defined.
Further, k would be a functional and you do no more have an ordinary
differential equation.
On the other hand, if k is a constant and you mean: k (x1[t]-x2[t]),
there is still an equation for k missing.
Daniel
twoseat wrote:
> Hello
>
> I am trying to use mathematica to solve for the stiffness of a spring system but I cannot figure out how to plot my equations correctly.
>
> I have:
> m1=220;
> m2=300;
> v0=12;
> k; (*temp. I am solving for this*)
>
> a = NDSolve[{k[x1[t] - x2[t]]*(x1[t] - x2[t]) - m1*x1''[t] == 0,
> m1*x1''[t] - m2*x2''[t] == 0, x1[0] == 0, x2[0] == 0,
> x1'[0] == v0, x2'[0] == 0}, {x1[t], x2[t]}, {t, -10, 20}]
> dis = Plot[Evaluate[{x1[t] - x2[t]} /. a], {t, -10, 20}]
>
>
> This gives me multiple errors and wont plot.
>
> I am going to try to plot k[x1[t]-x2[t]]*(x1[t]-x2[t]) vs (x1[t]-x2[t]) to solve for k but I can't determine how to set up my equations to plot.
>
> Any help or recommendations would be appreciated!
>