# DifferentialEquations.jl -not working

**URL:** <https://discourse.julialang.org/t/differentialequations-jl-not-working/3628>\
**Category:** New to Julia\
**Tags:** question, diffeq\
**Created:** [May 10, 2017, 9:26am UTC](https://discourse.julialang.org/t/differentialequations-jl-not-working/3628 "2017-05-10T09:26:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrapo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mrapo/32/3911_2.png) [@mrapo](https://discourse.julialang.org/u/mrapo)\
**Post date:** [May 10, 2017, 9:26am UTC](https://discourse.julialang.org/t/differentialequations-jl-not-working/3628/1 "2017-05-10T09:26:53Z")

</div>

Hi everyone,

I’m quite new to Julia and I’ve been stuck on a problem for awhile. I’m trying to learn to solve differential equations with Julia. For instance I tried to run a pre-made simple example code by Christopher Rackauckas, but I got an error.

The code can be found [here](http://www.juliabloggers.com/introducing-differentialequations-jl/). It’s the first code on that page. I’ll also write it here:

using DifferentialEquations  
alpha = 0.5 #Setting alpha to 1/2  
f(y,t) = alpha\*y  
u0 = 1.5  
prob = ODEProblem(f,u0)  
timespan = [0,1] # Solve from time = 0 to time = 1  
sol = solve(prob,timespan) # Solves the ODE  
using Plots  
plot(sol) # Plots the solution using Plots.jl

And the error I’m getting says: \>LoadError: MethodError: no method matching DiffEqBase.ODEProblem{uType,tType,isinplace,F,C,MM}(::#f ::Float64).

I have installed the DifferentialEquations.jl -package, even removed it and then re-installed it, but nothing changed. Other similar codes won’t work either. Anyone with more experience having suggestions what I should try to do in order to fix this?

---

<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 10, 2017, 9:30am UTC](https://discourse.julialang.org/t/differentialequations-jl-not-working/3628/2 "2017-05-10T09:30:44Z")

</div>

This might be a cross-post of

> <https://stackoverflow.com/questions/43886727/trouble-with-differentialequations-jl/43887060#43887060>

As noted there, that’s because this code was pulled from an old blog post. The blog post was updated to:

```julia
using DifferentialEquations
alpha = 0.5 #Setting alpha to 1/2
f(y,t) = alpha*y
u0 = 1.5
tspan = (0.0,1.0) # Solve from time = 0 to time = 1
prob = ODEProblem(f,u0,tspan)
sol = solve(prob) # Solves the ODE
using Plots
plot(sol) # Plots the solution using Plots.jl

```
