Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 12461

Questions on the symbolic (DSolve, DifferentialRoot) and numerical (NDSolve) solutions of differential equations in Mathematica.

2 votes
0 answers
62 views

Is this the expected EvaluationMonitor behavior with NDSolve with Method->"SymplecticPartiti...

It appears that EvaluationMonitor is not being called as expected, but only when I am using SymplecticPartitionedRungeKutta. Here is a stripped down example to illustrate. Forces in Hamilton's equatio …
Craig Carter's user avatar
  • 4,839
2 votes

Particle moving in a 2D box

Is something like this what you are looking for? Alternative solutions could use WhenEvent inside of NDSolve. Hopefull, the names of reflect[ finalPosition_, wallPosition_] := 2 wallPosition - fina …
Craig Carter's user avatar
  • 4,839
2 votes
1 answer
85 views

Implement NDSolve when I have a very efficient way to compute the right-hand-sides of my cou...

I am trying speed up NDSolve on a set of coupled non-linear second-order ODEs. x[1]''[t] = f[1][x[1],x[2],....] x[2]''[t] = f[2][x[1],x[2],....] : x[n]''[t]..... No problem here--these can be dropp …
Craig Carter's user avatar
  • 4,839
0 votes
Accepted

How to analytically solve for the impulse response function of an ODE system?

DSolve will give you a symbolic result, albeit messy and containing integrals containing the arbitrary function C0[t]: DSolve[{C1'[t] == K1*C0[t] - (k2 + k3)*C1[t] + k4*C2[t], C2'[t] == k3*C1[t] - …
Craig Carter's user avatar
  • 4,839
2 votes
Accepted

NDSolve: Infinite expression 1/0 encountered

This may be an answer to an approximation to your question. I am making assumptions. In addition to the problem at r=0, the derivative of your piecewise function is zero when r=0. The this gives you …
Craig Carter's user avatar
  • 4,839
3 votes

Find height of oscillating solution from NDSolve

I am not sure if I understand the question--are you looking for a way to collect the maxima? If so, you could do this: {sol, extrema} = Reap[ NDSolveValue[{y''[t] == -(1/10 + 1/t) y'[t] - 1 + 6*y[t] …
Craig Carter's user avatar
  • 4,839
1 vote

Incorrect result of DSolve

Too long for a comment--not an answer. Note that clearing w, doesn't clear w'[z]. DSolve does appear to be giving an invalid solution here. Perhaps, it is picking an incorrect branch. sol = DSolve[{w' …
Craig Carter's user avatar
  • 4,839
2 votes

How can I solve a PDE on the real line with DSolve?

This works: f[x_] := Exp[-x^2] DSolve[{D[u[x, t], {t, 1}] == D[u[x, t], {x, 2}], u[x, 0] == f[x]}, u, {x, t}]
Craig Carter's user avatar
  • 4,839
0 votes

Is there a way to give an analytical result to the following integral?

When I run your code with few modifications, I get an analytical result (and the integrations return quickly: There is no benefit in your definition with a pattern, so: \[Rho]r = \[Rho]R*(1 - k*Rs/r) …
Craig Carter's user avatar
  • 4,839
0 votes
Accepted

Numerically solve 2nd order differential equations:

This can be solved with the ShootingMethod To give you an idea of how this works, one needs to find the boundary condition that satisfies v[4]==1. So, this is an illustration of guessing: rv = Parame …
Craig Carter's user avatar
  • 4,839
2 votes

Why can't I add to an array from another array inside a for loop

The suggestion by Bill S is an example of how one can learn to shift from a programmatic to a functional style. It is useful to learn this style. Here is another: baseFunctions = {AiryAi[\[FormalX]]^ …
Craig Carter's user avatar
  • 4,839