Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

Solution of diff. equation i the form of list?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg5538] [mg5517] Solution of diff. equation i the form of list?
  • From: Allan Hayes <hay at haystack.demon.co.uk>
  • Date: Thu, 19 Dec 1996 01:02:34 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

ufwlazlo at cyf-kr.edu.pl (Wojciech Wlazlo)
[mg5517] Solution of diff. equation i the form of list?
writes

>I tried .....
>
>DSolve[{z'[x]==-z[x],z[0]==1},z[x],x]
>data=Table[{x,z[x] /. %},{x,0.0,1.5,0.1}]
>
> and I got:
>
>{{z[x]->Exp[-x]}}
>{{{0.0,{1.0}},{0.1,{0.8}}, etc
>       ^   ^       ^   ^
>How to get rid of above extra {}'s?

Wojciech:
sol = DSolve[{z'[x]==-z[x],z[0]==1},z[x],x]
	           -x
	{{z[x] -> E  }}

data=Table[{x,z[x] /. %[[1]]},{x,0.0,1.5,0.1}]
		       ^^^^^
{{0., 1.}, {0.1, 0.904837}, {0.2, 0.818731}, {0.3, 0.740818},
  {0.4, 0.67032}, {0.5, 0.606531}, {0.6, 0.548812}, {0.7, 0.496585}, 
  {0.8, 0.449329}, {0.9, 0.40657}, {1., 0.367879}, {1.1, 0.332871}, 
  {1.2, 0.301194}, {1.3, 0.272532}, {1.4, 0.246597}, {1.5, 0.22313}
 }

 Allan Hayes
 hay at haystack.demon.co.uk
 http:www.haystack.demon.co.uk



  • Prev by Date: Re: How to get rid of the outer {}?
  • Next by Date: Re: RSolve question
  • Previous by thread: Solution of diff. equation i the form of list?
  • Next by thread: Re: Solution of diff. equation i the form of list?