       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.

Clear[x, c, t];
DSolve[x'[t] == (t - 4)*E^(4*t) + t*x[t],
x, t][[1,1]]
% /. C -> 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]
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. 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[t]
-E^(4*t) + E^(t^2/2)

x[0.5]
-6.25591

Plot[x[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

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