Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2003
*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 2003

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

Search the Archive

RE: Finding solutions to differential eqns

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40114] RE: [mg40091] Finding solutions to differential eqns
  • From: "David Park" <djmp at earthlink.net>
  • Date: Fri, 21 Mar 2003 02:36:39 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

David,

Certainly, but you have to study some Mathematica basics, learn how to use
the various brackets, how to write derivatives, how % works, how Functions
work, read the Help for DSolve, learn how solutions are returned as rules,
and how to convert the rule to a definition of the function that solves your
equation.

Here is your last equation...

Clear[x, c, t];
DSolve[x'[t] == (t - 4)*E^(4*t) + t*x[t],
   x, t][[1,1]]
% /. C[1] -> c
x[c_][t_] = Simplify[x[t] /. %]

which gives...

x -> Function[{t}, -((-4*E^(4*t) + E^(4*t)*t)/
      (-4 + t)) + E^(t^2/2)*C[1]]
x -> Function[{t}, -((-4*E^(4*t) + E^(4*t)*t)/
      (-4 + t)) + E^(t^2/2)*c]
-E^(4*t) + c*E^(t^2/2)

1) First the symbols used in the equation were cleared.
2) DSolve solves the differential equation and the first solution was picked
out with [[1,1]].
3) Mathematica solves in terms of a general constant C[1]. But this is an
expression so it it replaced with the symbol c.
4) Then the definition for x[c][t] is given. c is a parameter and t is the
variable. It is done by writing x[t] and then using the DSolve solution to
substitute for x.

We can now use the definition. For example...

x[1][t]
-E^(4*t) + E^(t^2/2)

x[1][0.5]
-6.25591

Plot[x[1][t], {t, -1, 1}];

The solution does solve the equation.

x[c]'[t] == (t - 4)*E^(4*t) + t*x[c][t]//Simplify
True

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/





From: David [mailto:davidol at hushmail.com]
To: mathgroup at smc.vnet.net
Subject: [mg40114] [mg40091] Finding solutions to differential eqns


Is there a method where you can get Mathematica to find general
solutions for differential equations?  For example:

[2xt(1 + t)]dx/dt = 1 + x^2

dx/dt = (t/x)e^(-x/t) + x/t

and

dx/dt = (t - 4)e^4t + tx

I have access to version 4.0

Cheers,

David



  • Prev by Date: Re: simple question if/while loop
  • Next by Date: Re: Increase in efficiency with Module
  • Previous by thread: Re: Finding solutions to differential eqns
  • Next by thread: Remote site, terminal emulator in Windows