Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2007

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

Search the Archive

Re: Can DSolve handle normalized vectors?

  • To: mathgroup at
  • Subject: [mg83556] Re: Can DSolve handle normalized vectors?
  • From: dh <dh at>
  • Date: Thu, 22 Nov 2007 06:38:52 -0500 (EST)
  • References: <fi0otp$65a$>


I wrote your system of equations in a more approbriate form and DSolve 

has no problem:


f1[t_]=(6.673`*^31 (-x1[t]+xx1))/((-x1[t]+xx1)^2+(-x2[t]+xx2)^2);

f2[t_]=(6.673`*^31 (-x2[t]+xx2))/((-x1[t]+xx1)^2+(-x2[t]+xx2)^2);





It is a good idea to choose units so that you have numerical factors of 

the order of unity. Otherwise you may have numerical problems.

hope this helps, Daniel

ram.rachum at wrote:

> Hello hello, it's me again. So I figured out how to use vectors in

> DSolve. Now I tried to input a simple physical system into DSolve. The

> only physical force I allowed was gravity. It didn't work. I tried

> various systems, but none of them worked. I gradually simplified them,

> making one of the objects stationary, playing with the force

> equations, etc. I think I narrowed down the problem: DSolve won't work

> if there I use a unit vector in one of the functions.

> I defined a function unitvector[x] that gives you a vector in the

> direction of x with a length of one. It's quite straightforward, but

> when I use this function in one of the equations, DSolve goes

> Solve::svars. I tried calculating a unit vector in other ways, without

> calling the function, but they all produced the same svars.

> Here's the code:


> \!\(\(x[t_] = {x1[t], x2[t]};\)\[IndentingNewLine]

>   \(xx[t_] = {xx1[t], xx2[t]};\)\[IndentingNewLine]

>   \(f[t_] = {f1[t], f2[t]};\)\[IndentingNewLine]

>   \(ff[t_] = {ff1[t], ff2[t]};\)\[IndentingNewLine]

>   \(g = 6.673*10\^\(-11\);\)\[IndentingNewLine]

>   \(vnorm[x_] := \@\((x . x)\);\)\[IndentingNewLine]

>   unitvector[x_] := x/vnorm[x]\)


> \!\(eqn = {x[0] == {

>     0, 0}, \(x'\)[0] == {0, 10\^17},

>       xx[t] == {10\^11, 0}, \(x''\)[t] == f[t]/\((\ 1*10\^18)\),

>           f[t] == \(g*\((1*10\^18)\)*\((1*10\^24)\)\)\/vnorm[xx[t] -

> x[t]]*

>         unitvector[xx[t] - x[t]]}\)


> DSolve[Thread /@ eqn // Flatten, Flatten[{x[t], xx[t], f[t]}], {t}]


> So is Mathematica simply unable to solve something that uses a unit

> vector?


  • Prev by Date: Re: Problems with Mathematica text in email
  • Next by Date: Re: How can I find roots in Mathematica 6?
  • Previous by thread: Can DSolve handle normalized vectors?
  • Next by thread: Dynamic Timeout