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

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

Search the Archive

Re: DSolve problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60105] Re: DSolve problem
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Fri, 2 Sep 2005 06:37:39 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, U.K.
  • References: <df946n$62v$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

sunnewton wrote:
> Hi,
> I am a freshman of Mathematica, I need help here...
> 
> I met such problem as:
> 
> DSolve[y'[x] == sin[t] - 2y[x], y[x], t]
> 
> DSolve::"dvnoarg": "The function \!\(y[x]\) appears with no arguments."
> 
> How to Handle???
> 
First, correct the syntax error: sin[t] must be written Sin[t] with a 
capital "S" (Any built-in Mathematica functions starts with a capital 
letter).

Second, answer the following question: Is the function y depends on the 
variable x or t? Depending on your answer to this question and assuming 
that the ODE itself is correctly written, you can write either of the 
following DSolve commands:

In[1]:=
DSolve[Derivative[1][y][x] == Sin[t] - 2*y[x], y[x], x]

Out[1]=
{{y[x] -> C[1]/E^(2*x) + Sin[t]/2}}

In[2]:=
DSolve[Derivative[1][y][t] == Sin[t] - 2*y[t], y[t], t]

Out[2]=
{{y[t] -> C[1]/E^(2*t) + (1/5)*(-Cos[t] + 2*Sin[t])}}

The third argument of *DSolve* is the variable(s) used to solve the ODE. 
The second argument is the function(s) to which you want a solution: 
here, you have the choice to ask for a solution expressed as pure 
function, if you set the argument to y only, or as an expression with 
the variable, if you set the argument to y[x] or y[t]. Whatever your 
choice is, however, you still have to list explicitly the variable as 
third argument.

Hope this helps,
/J.M.


  • Prev by Date: Re: web service package connection failure
  • Next by Date: Please explain this weird Integrate result
  • Previous by thread: Re: DSolve problem
  • Next by thread: Re: DSolve problem