Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DSolve Not Working

1,142 views
Skip to first unread message

Will Oram

unread,
Dec 9, 2003, 3:46:28 AM12/9/03
to
I'm using Mathematica 5; DSolve[] never works. I am literally copying from
its own documentation, and it still spits out failures. For example:

In: DSolve[y''[x]==ay'[x]+y[x],y,x]
DSolve::dvnoarg: The function y appears with no arguments
Out: DSolve[y''[x]==(ay)/x+y[x],y,x]

Wha?

Owen, HL (Hywel)

unread,
Dec 10, 2003, 4:11:33 AM12/10/03
to
Put a space between a and y - that might sort out your problem.

Sorasak

unread,
Dec 10, 2003, 4:16:41 AM12/10/03
to
DSolve[y''[x] == ay'[x] + y[x], y[x], x]

Try above. You missed the argument x.

Sorasak

Jens-Peer Kuska

unread,
Dec 10, 2003, 4:18:43 AM12/10/03
to
Hi,

at first "ay" and "a y" are different things, the first is the symbol ay,
the second mean a*y
second my Mathematica 5.0 say

In[]:=DSolve[y''[x] == a y'[x] + y[x], y, x]
Out[]={{y -> Function[{x}, E^(((a - Sqrt[4 + a^2])*x)/2)*
C[1] + E^(((a + Sqrt[4 + a^2])*x)/2)*C[2]]}}

third the error message you report is inconsistent with your input.
The error message


> DSolve::dvnoarg: The function y appears with no arguments

comes typical from a forgotten argument, i.e.
DSolve[y'[x] == l*y, y[x], x]

instead of

DSolve[y'[x] == l y[x], y[x], x]

We *can* not help you if you don't provide your correct input!

Regards
Jens

"Will Oram" <spa...@NOSPAM.foxchange.NOSPAM.com> schrieb im Newsbeitrag
news:br4254$j1n$1...@smc.vnet.net...

extrabyte

unread,
Dec 10, 2003, 4:20:46 AM12/10/03
to
Will Oram wrote:
[snip]

> In: DSolve[y''[x]==ay'[x]+y[x],y,x]
> DSolve::dvnoarg: The function y appears with no arguments
> Out: DSolve[y''[x]==(ay)/x+y[x],y,x]
>
> Wha?

In[1]=sol[a_] :=DSolve[y''[x] == a y'[x] + y[x], y[x], x]

In[2]=f[x_, a_] := y[x] /. sol[a][[1]]

In[3]=f[x,a]

Out[3]=Exp[0.5*(a-Sqrt[4+a^2])x]C[1]+Exp[0.5*(a+Sqrt[4+a^2])x]C[2]


regards
--
extrabyte
http://extrabyte.splinder.it
http://www.hardwarenonsolo.3go.it


Mariusz Jankowski

unread,
Dec 10, 2003, 4:23:49 AM12/10/03
to
You are probably missing a space between a and y, so your equation is
different from the one in the help browser. Consider spending a little time
studying Mathematica basics, will save you a lot of time in the future!

Mariusz

>>> Will Oram<spa...@NOSPAM.foxchange.NOSPAM.com> 12/9/2003 3:46:28 AM >>>

Mu-Pi

unread,
Dec 10, 2003, 4:28:54 AM12/10/03
to

"Will Oram" <spa...@NOSPAM.foxchange.NOSPAM.com> wrote in message
news:br4254$j1n$1...@smc.vnet.net...

> I'm using Mathematica 5; DSolve[] never works. I am literally copying from
> its own documentation, and it still spits out failures. For example:
>
> In: DSolve[y''[x]==ay'[x]+y[x],y,x]

You need a space between the a and the y'[x].

Bill Rowe

unread,
Dec 10, 2003, 4:30:59 AM12/10/03
to
On 12/9/03 at 3:32 AM, spa...@NOSPAM.foxchange.NOSPAM.com (Will Oram) wrote:

> I'm using Mathematica 5; DSolve[] never works. I am literally copying from
> its own documentation, and it still spits out failures. For example:

> In: DSolve[y''[x]==ay'[x]+y[x],y,x]

> DSolve::dvnoarg: The function y appears with no arguments
> Out: DSolve[y''[x]==(ay)/x+y[x],y,x]

This isn't quite the problem the documentation gives. There should be a space between a and y'. However, either with the space or without the space DSolve gives me an answer in Mathematica 5.0. Does DSolve fail as you outlined when this is the first thing done in a newly started session? If yes, then it would seem there is something wrong with your Mathematica installation. If no, then there must be something else in your notebook preventing DSolve from working correctly in this example.
--
To reply via email subtract one hundred and nine

Bobby R. Treat

unread,
Dec 10, 2003, 4:38:07 AM12/10/03
to
EVERY DAY, we hear DSolve isn't working.

You didn't get that output from that input.

DSolve[y''[x]==ay'[x]+y[x],y,x]

{{y -> Function[{x},
E^x*C[1] + C[2]/E^x +
(E^(2*x)*Integrate[
((1/2)*Derivative[
1][ay][K$1927])/
E^K$1927, {K$1927,
K$1928, x}] +
Integrate[(-(1/2))*
E^K$2236*
Derivative[1][ay][
K$2236], {K$2236,
K$2237, x}])/E^x]}}

You omitted a space between a and y on the right side of the equation,
leading to this strange result.

The input you actually used was probably

DSolve[y''[x] == a y/x + y[x], y, x]

which returns the output in your post. On the other hard, copying and
pasting from Help gives:

DSolve[y''[x] == a y'[x] + y[x], y, x]

{{y -> Function[{x},

E^((1/2)*(a - Sqrt[
4 + a^2])*x)*C[1] +
E^((1/2)*(a + Sqrt[
4 + a^2])*x)*C[2]]}}

Bobby

Will Oram <spa...@NOSPAM.foxchange.NOSPAM.com> wrote in message news:<br4254$j1n$1...@smc.vnet.net>...

Adam Smith

unread,
Dec 11, 2003, 5:35:42 AM12/11/03
to
You need a space or a multiplication sign "*" between the a and y'[x]
in the term "ay'[x]". Mathematica interprets the ay'[x] as a
derivative of a variable named "ay".

Adam Smith

Will Oram <spa...@NOSPAM.foxchange.NOSPAM.com> wrote in message news:<br4254$j1n$1...@smc.vnet.net>...

0 new messages