# Tag Info

5

A typical way to test the result of a function is to set res = DSolve[...] and then test FreeQ[res, DSolve] to see if the result is free of any DSolve command. Now, DSolve might solve a differential equation in terms of Solve: DSolve[D[ ExpIntegralEi[x + y[x]] == x, x], y, x] (* Solve[-x + ExpIntegralEi[x + y[x]] == C[1], y[x]] *) This might not ...

3

f can be computed as follows. s = NDSolveValue[{f'''[y] + f[y] f''[y] + 4 - (f'[y])^2 == 0, f[0] == 0, f'[0] == 0, f'[5] == 2}, f, {y, 0, 5}, Method -> "Shooting", "StartingInitialConditions" -> {f[0] == 0, f'[0] == 0, f''[0] == 3.48}}]; Plot[s[y], {y, 0, 5}, AxesLabel -> {y, f}] Plot[s'[y], {y, 0, 5}, PlotRange -> {-1, 3}, AxesLabel ...

3

Depending on what you want to do with it, you might use the built-in InverseLaplaceTransform: InverseLaplaceTransform[c s/(1 + r c s), s, t] c (-(E^(-(t/(c r)))/(c^2 r^2)) + DiracDelta[t]/(c r))

3

Why not solve the problem exactly? You will find that the asymptotics does not fit what you requested but contains an additional logarithmic phase. yy[r_] = y[r] /. DSolve[y''[r] + (1 + 1/r) y[r] == 0 && y[0] == 0 && y'[0] == 5, y[r], r][[1]] // Quiet (* Out[151]= 5 E^(-I r) r Hypergeometric1F1[1 + I/2, 2, 2 I r] *) Checking ...

3

Change the definitions so that the step output is a list: CRK4[]["Step"[rhs_, h_, t_, x_, xp_]] := Module[{k0, k1, k2, k3}, k0 = h xp; k1 = h rhs[t + h/2, x + k0/2]; k2 = h rhs[t + h/2, x + k1/2]; k3 = h rhs[t + h, x + k2]; {(k0 + 2 k1 + 2 k2 + k3)/6}] (* <-- List *) CRK4[___]["StepInput"] = {"F"["T", "X"], "H", "T", "X", "XP"}; ...

2

Your equation (assuming $\nu =1$, to begin with) is a fairly conventional linear partial differential equation given by eq = D[u[r, t], t] == 3/r D[Sqrt[r] D[Sqrt[r] u[r, t], r], r] // Simplify $$2 u^{(0,1)}(r,t)=\frac{9 u^{(1,0)}(r,t)}{r}+6 u^{(2,0)}(r,t)$$ The separation ansatz u = Exp[- 3 k^2 t] v[r] with a separation constant $k$ leads to an ...

2

This is a bug. As a workaround try using: TiG[z_?NumericQ] := solnD[td, z];

2

We solve here the 3D equation $$\nabla ^2\phi =-8 (1-\exp (\phi ))$$ in the special case of spherical symmetry, and compare the numerical solution with the exact soluton of the linearized problem. We leave a possible derivation of this equation in the 3D case to the author of the OP. The equation to be solved is in Mathematica notation eq3 = u''[r] + ...

2

How about this: tEnd = 10.; solnFEM = NDSolveValue[{eqn2 == NeumannValue[-28, z == 0], Subscript[\[CapitalGamma], D], T[0, z] == Ti[z]}, T, {t, 0, tEnd}, {z, 0, ts + tsl}, Method -> {"PDEDiscretization" -> {"MethodOfLines", "SpatialDiscretization" -> {"FiniteElement"}}}] Seems to get reasonably close: ...

2

You can use the definition of Laplace. Assuming zero initial conditions, replace $s$ with $\frac{dy}{dt}$ and $s^2$ with $\frac{d^2y}{dt^2}$ and so on. tfToDiff[tf_, s_, t_, y_, u_] := Module[{rhs, lhs, n, m}, rhs = Numerator[tf]; lhs = Denominator[tf]; rhs = rhs /. m_. s^n_. -> m D[u[t], {t, n}]; lhs = lhs /. m_. s^n_. -> m D[y[t], {t, n}]; ...

1

As mentioned in the comment above, I didn't reproduce the image you gave, maybe my arbitrarily chosen u0 and v0 are not proper, maybe I've made a mistake somewhere, maybe something is wrong with the equation you provided. Anyway I'll show my 2 solutions below, one with NDSolve, the other with FDM using the difference scheme you provided, the results of the 2 ...

1

In order for the set of equations in the question to have a solution, the vector must be Curl-free. In other words, all components of Curl[{f[x, y, z], g[x, y, z], h[x, y, z]}, {x, y, z}] (* {-Derivative[0, 0, 1][g][x, y, z] + Derivative[0, 1, 0][h][x, y, z], Derivative[0, 0, 1][f][x, y, z] - Derivative[1, 0, 0][h][x, y, z], -Derivative[0, 1, ...

1

I have managed to get a solution and it appears somewhat correct (not entirely physically accurate), I don't know why this works but by not defining the independent variables t and z in for the solution achieves results. I switched the following line for the new line of code given below. Original Code: soln[t_, z_] = NDSolveValue[{eqn2 == 0, ...

1

Firstly, your f function is undefined at the boundaries between regions, so use <= to make sure the whole range is covered f[x_] := \[Piecewise]{{Tanh[2 x], 0 <= x < 2}, {Tanh[-2 (x - 4)], 2 <= x < 6}, {Tanh[2 (x - 8)], 6 <= x < 10}, {Tanh[-2 (x - 12)], 10 <= x <= 14}}; d = f'; Second, when you try to take the ...

Only top voted, non community-wiki answers of a minimum length are eligible