# Plot of ODE solution

can help to graph on z-axis

NDSolve[{f''''[z] + f'''[z] + 1000 f''[z] == 1, y[-(1/2)] == 0, y[1/2] == 0, y''[-(1/2)] == 0, y''[1/2] == 0}, y[z], z]

• In your code, you use sometimes f[z] and sometimes y[z]. Turn it to the same notation. Besides, using NDSolve you need to fix the boundaries of the interval of integration of your equation. So, fix it. After that go to Menu/Help/WolframDocumentation/NDSolve and have a look at the very first example given there. You will see, how to plot it. – Alexei Boulbitch Apr 4 '19 at 7:45

## 2 Answers

As Alexei mentioned, you need to name your functions consistently:

sol = NDSolve[
{f''''[z] + f'''[z] + 1000 f''[z] == 1,
f[-1/2] == 0, f[1/2] == 0,
f''[-1/2] == 0, f''[1/2] == 0},
f, {z, -10, 10}
];

Plot[f[x] /. sol, {x, -10, 10}] DSolve can find an exact solution

Clear["Global*"]

eqns = {f''''[z] + f'''[z] + 1000 f''[z] == 1, f[-1/2] == 0, f[1/2] == 0,
f''[-1/2] == 0, f''[1/2] == 0};

sol = DSolve[eqns, f, z][] //
ReplacePart[#,
{-1, -1, -1} -> FullSimplify@#[[-1, -1, -1]]] &

(* {f -> Function[{z}, (1/8000000000)
E^(1/2 (-1 - z))
Csc[Sqrt/4] Sec[Sqrt/
4] (Sqrt E^(
z/2) (-1 + E - 2 z - 2 E z + 4 Sqrt[E] z Cos[Sqrt/2]) +
2 E^((1 + z)/2) (-251999 + 1000000 z^2) Sin[Sqrt/2] +
2 E^(1/4) (Sqrt Cos[1/4 Sqrt (1 - 2 z)] -
Sqrt[3999 E] Cos[1/4 Sqrt (1 + 2 z)] +
1999 (Sin[1/4 Sqrt (1 - 2 z)] +
Sqrt[E] Sin[1/4 Sqrt (1 + 2 z)])))]} *)


Verifying the solution,

And @@ eqns /. sol // Simplify

(* True *)

Plot[f[x] /. sol, {x, -10, 10}]
` 