# Trying to resolve a BVProblem

**URL:** <https://discourse.julialang.org/t/trying-to-resolve-a-bvproblem/38950>\
**Category:** New to Julia\
**Created:** [May 7, 2020, 12:17pm UTC](https://discourse.julialang.org/t/trying-to-resolve-a-bvproblem/38950 "2020-05-07T12:17:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aquarelle332](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aquarelle332/32/20816_2.png) [@aquarelle332](https://discourse.julialang.org/u/aquarelle332)\
**Post date:** [May 7, 2020, 12:17pm UTC](https://discourse.julialang.org/t/trying-to-resolve-a-bvproblem/38950/1 "2020-05-07T12:17:42Z")

</div>

Hello dear all,

I am currently trying to resolve a BVProblem. Thus I came back to an example given in the [Boundary Value Problems](https://docs.sciml.ai/release-3.2/tutorials/bvp_example.html) section.  
If I use the code as follows:

```julia
using BoundaryValueDiffEq
using OrdinaryDiffEq, Plots

const g = 9.81
L = 1.0
tspan = (0.0,pi/2)

function simplependulum(t,u,du)
    θ = u[1]
    dθ = u[2]
    du[1] = dθ
    du[2] = -(g/L)*sin(θ)
end

function bc(residual, ua, ub) # ua = beginning of time span, ub = end
    residual[1] = ua[1] + pi/2 # solution at the beginning of time span (-pi/2)
    residual[2] = ub[1] - pi/2 # solution at the end of time span should (pi/2)
end

bvp = TwoPointBVProblem(simplependulum, bc, [pi/2,pi/2], tspan)
sol = solve(bvp, MIRK4(), dt=0.05)        
plot(sol)

```

I obtain an error related to:

```julia
sol = solve(bvp, MIRK4(), dt=0.05)  

```

```julia
LoadError: MethodError: no method matching simplependulum(::Array{Float64,1}, ::Array{Float64,1}, ::DiffEqBase.NullParameters, ::Float64)

```

May I ask you some help?  
Thank you in advance,

Thierry

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [May 7, 2020, 12:27pm UTC](https://discourse.julialang.org/t/trying-to-resolve-a-bvproblem/38950/2 "2020-05-07T12:27:52Z")

</div>

You’re looking at old docs (v3.2, so about 3 years ago). Take a look at the latest: [https://docs.sciml.ai/latest/tutorials/bvp\_example/](https://docs.sciml.ai/latest/tutorials/bvp_example/)

---

<div class="post-metadata">

**Author:** ![aquarelle332](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aquarelle332/32/20816_2.png) [@aquarelle332](https://discourse.julialang.org/u/aquarelle332)\
**Post date:** [May 7, 2020, 12:45pm UTC](https://discourse.julialang.org/t/trying-to-resolve-a-bvproblem/38950/3 "2020-05-07T12:45:04Z")

</div>

It is perfectly right. 😉  
Many thanks for this remark. On the right way now.  
Have a good day.  
Thierry
