Re: Mathematica DSolve Terminal Boundary- How?
- To: mathgroup at smc.vnet.net
- Subject: [mg68239] Re: Mathematica DSolve Terminal Boundary- How?
- From: Peter Pein <petsie at dordos.net>
- Date: Sun, 30 Jul 2006 04:48:17 -0400 (EDT)
- References: <eaer6i$59t$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Ajaz Hussain schrieb:
> Hi,
>
> I am trying to find a general solution for a differential equation from t = o to t = T. I know that y[T]== 0 but don't know y[0]. How do I "fool" DSolve to give me a solution? The manual gives this command for boundary values:
>
> DSolve[ {eqn == 0, y[o] == initial value}, y[x], x]
>
> I want to instead have: y[T] = terminal value
>
> Thanks!!
>
Hello,
it /is/ possible, to use boundary conditions.
A simple example:
In[1]:= soln = DSolve[{y'[t] - y[t] == 1/Cosh[t], y[T] == 0}, y, t];
In[2]:= f = y /. First[soln]
Out[2]= Function[{t}, (-E^t)*(Log[1 + E^(-2*t)] - Log[1 + E^(-2*T)])]
In[3]:= f[T] == 0
Out[3]= True
In[4]:= f[0]
Out[4]= -Log[2] + Log[1 + E^(-2*T)]
Peter