The initial condition becomes a "True"...
In Mathematica 7.0.1 Home Edition, this same input gives the expected
output:
{{y[x] -> -(1/2) a E^-x (-1 + E^x Cos[x] - E^x Sin[x])}}
What am I missing?
DSolve[{y'[x] + y[x] == a Sin[x], y[0] == 0}, y[x], x] // InputForm
{{y[x] -> -(a*(-1 + E^x*Cos[x] - E^x*Sin[x]))/(2*E^x)}}
This is equivalent to what you obtained with Mathematica 7.0.1.
I suspect that before evaluating the DSolve expression in your 8.0.0
session, you had set y[x] to be the solution, or something like that.
On 1/28/2011 6:14 AM, Bert RAM Aerts wrote:
> When I enter the following in Mathematica 8.0.0 Home Edition:
> DSolve[{y'[x] + y[x] == a Sin[x], y[0] == 0}, y[x], x]
> I get
> DSolve::deqn: Equation or list of equations expected instead of True
> in the first argument {y[x]+(y^\[Prime])[x]==a Sin[x],True}.>>
>
> The initial condition becomes a "True"...
>
> In Mathematica 7.0.1 Home Edition, this same input gives the expected
> output:
> {{y[x] -> -(1/2) a E^-x (-1 + E^x Cos[x] - E^x Sin[x])}}
>
> What am I missing?
>
--
Murray Eisenberg mur...@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305
It works here:
In[4]:= $Version
8.0 for Microsoft Windows (64-bit) (November 13, 2010)
In[6]:= DSolve[{y'[x]+y[x]==a Sin[x],y[0]==0},y[x],x]
Out[6]= {{y[x]->-(1/2) a E^-x (-1+E^x Cos[x]-E^x Sin[x])}}
May be you can post the InputForm? may be your ' is not really a ' ?
--Nasser
DSolve[{y'[x] + y[x] == a Sin[x], y[0] == 0}, y[x], x]
{{y[x] -> -(1/2) a E^-x (-1 + E^x Cos[x] - E^x Sin[x])}}
$Version
"8.0 for Mac OS X x86 (64-bit) (November 6, 2010)"
Bobby
On Fri, 28 Jan 2011 05:14:21 -0600, Bert RAM Aerts
<bert.ra...@gmail.com> wrote:
> When I enter the following in Mathematica 8.0.0 Home Edition:
> DSolve[{y'[x] + y[x] == a Sin[x], y[0] == 0}, y[x], x]
> I get
> DSolve::deqn: Equation or list of equations expected instead of True
> in the first argument {y[x]+(y^\[Prime])[x]==a Sin[x],True}. >>
>
> The initial condition becomes a "True"...
>
> In Mathematica 7.0.1 Home Edition, this same input gives the expected
> output:
> {{y[x] -> -(1/2) a E^-x (-1 + E^x Cos[x] - E^x Sin[x])}}
>
> What am I missing?
>
Most likely you originally had set y[0]=0 or something like that.
Clear[y] would have fixed it. Quitting Mathematica clears everything, so
that also fixed the problem.
--
Helen Read
University of Vermont