Problem with NDSOLVE in Mathematica

  • Mathematica
  • Thread starter nikolafmf
  • Start date
  • #1
114
0
Mathematica says:

"NDSolve::alliv: "The function x[t] was specified without dependence on all the independent variables. Each function must depend on all the independent variables.""

But function x depends only on t, there is no other variable specified in the code.

What could be the problem? I attach .nb file below.
 

Attachments

Answers and Replies

  • #2
1,868
0
Hi

Try this:

Code:
NDSolve[{
  y'[t] == -y[t], 
  x'[t] == x[t] + y[t],
  x[0] == 0, y[0] == 1},
 {x, y}, {t, 0, 1},
 Method -> "ExplicitMidpoint", "StartingStepSize" -> 1/10]
 
  • #3
114
0
It works. Thank you very much :)
 
  • #4
114
0
But for similar system with four variables Mathematica says this:

"NDSolve has computed initial values that give a zero residual for the \
differential-algebraic system, but some components are different from \
those specified. If you need them to be satisfied, it is recommended \
that you give initial conditions for all dependent variables and \
their derivatives."

What could be the cause of this and how to avoid it?
 

Related Threads on Problem with NDSOLVE in Mathematica

Replies
5
Views
3K
Replies
6
Views
2K
  • Last Post
Replies
3
Views
2K
Replies
4
Views
4K
Replies
8
Views
4K
Replies
3
Views
1K
Replies
2
Views
2K
  • Last Post
Replies
1
Views
7K
Replies
0
Views
2K
Top