Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
2 answers
157 views

Replacement with equivalent local variable and global variables give apparently different results using the same NDSolve output

I am solving a system ODEs which Mathematica quickly gives me a result varsol and dvarsol. Up to this point, everything is good. ...
xinxin guo's user avatar
  • 1,495
0 votes
1 answer
275 views

How to use result of NDSolve within a module?

I want to numerically solve a differential equation and use the resulting interpolating function for further calculations: ...
André's user avatar
  • 197
0 votes
1 answer
69 views

Getting error when I substitute PDE for ODE

The following code works perfectly: ...
confused's user avatar
  • 191
2 votes
1 answer
75 views

How to "Hold" variables assigned value inside DSolve?

Consider the following ODE: a = 0.8; b = 8; v = DSolveValue[{ u[x] == a*(b* u'[x] + u''[x]), u[4.925] == 4, u'[4.925] == 0.625 }, u[x], x] which gives ...
Joe Li's user avatar
  • 153
0 votes
0 answers
73 views

NDSolve and NIntegrate with parameters

I have a problem with a numeric computation. I should solve a numeric ODE and the rhs is a numeric parametric function that I find with several NIntegrate. I'd like ...
sam's user avatar
  • 1
1 vote
2 answers
131 views

Problem with internal variable of a `Module` which returns the solution of an `NDSolve` command. y$25947 → InterpilatingFunction[…]

I will try to give a minimal example of my problem. Say I define the following function, spitting out an NDSolve result, using ...
Britzel's user avatar
  • 683
1 vote
1 answer
111 views

NDSolve with Events that reevaluate with different Discrete Variables

I have the following problem: I have a set of ODEs and some discrete variables which I can solve successfully. Now I want mathematica to check at every $0.1 \,t$ time step, wether it would increase ...
Wolfgang Schneider's user avatar
5 votes
1 answer
131 views

why DSolve in V 12 returned an internal module variables with $ on them in this example?

Fyi, Reported to WRI in case it is a bug. [CASE:4288939] Is this supposed to happen? ...
Nasser's user avatar
  • 150k
0 votes
1 answer
216 views

NonlinearModelFit of an NDSolve result

I have some data : ...
J.A's user avatar
  • 1,285
5 votes
2 answers
207 views

HoldAll Attributes and Delayed Evaluation: ContourPlot with solutions to NDSolve

This is a general question on evaluating functions that are defined to be evaluated with delay. In particular, I am having difficulties working with the ...
OldTomMorris's user avatar
5 votes
2 answers
280 views

Sow in WhenEvent can't extract parameter value of ParametricNDSolve

This is a problem I noticed when trying to answer this question. Just consider the following toy example: ...
xzczd's user avatar
  • 68.4k
3 votes
2 answers
329 views

Problem with Evaluate inside Module

My problem I have a large system of differential equations which is automatically created, but to give you an easy example let's just say it is ...
Noiralef's user avatar
  • 379
0 votes
0 answers
144 views

How do I declare global constants and local constants? [duplicate]

Many times I have a Mathematica code like this ...
AzJ's user avatar
  • 697
5 votes
4 answers
572 views

Memory Problem with Modules and NDSolve

I'm using NDSolve inside a module, and I appear to have a memory leak. The relevant code is: ...
Lauren Pearce's user avatar
0 votes
1 answer
155 views

Substitution of a function in a differential equation

Suppose we have a differential equation as follows: g[t_] := t/2 m[t_] := t/3 A[t_] := {{g[t], 1}, {1, m[t]}} p'[t] == A[t]. p[t], p[0] == {1, 0} ...
Andrw's user avatar
  • 25