MathGroup Archive 2010

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

Search the Archive

Re: Lists of Equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg106357] Re: [mg106307] Lists of Equations
  • From: "David Park" <djmpark at comcast.net>
  • Date: Sun, 10 Jan 2010 03:30:06 -0500 (EST)
  • References: <1537969.1262943536382.JavaMail.root@n11>

Michael,

I assume that zn[x] is an expression in x that you know independently? Then
just define them first.

z1[x_]:= ...
z3[x_]:= ...   etc.

Then write your eqns statement.

(eqs = {y1'[x]==z1[x], ..., yn'[x]==zn[x]})//Column

where I have laid them out in a column - just for convenience.

If there is a systematic pattern to the zn functions, you could write them
as

z[x_,k_]:= expression of x and k.

or use SubValues:

z[k_][x_]:= ...


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  



From: Michael Knudsen [mailto:micknudsen at gmail.com] 


Hello,

I have just started using Mathematica, and I wonder what the easiest
way to manage a large set of equations is. I have a bunch of
differential equations

y1'[x] = z1[x]
y2'[x] = z2[x]
...
yn'[x] = zn[x]

and I have grouped them together in a list like

eqs = {y1'[x]==z1[x], ..., yn'[x]==zn[x]}

which fits perfectly as an argument to NDSolve. However, I think that,
at a later point, I may have to use z1,...,zn separately, and I
thought about defining

yeqs = {y1'[x],...,yn'[x]}
zeqs = {z1[x],...,zn[x]}

and them combine them. What I would really like is something like

yeqs + "==" + zeqs

but I can't seem to find any list operation that will do that. Any
help is appreciated.

Thanks,
Michael Knudsen




  • Prev by Date: Re: horizontal line color
  • Next by Date: Re: Symbolic Formula
  • Previous by thread: Re: Lists of Equations
  • Next by thread: Re: Lists of Equations