# Implementing two different noise processes in a differential equation

**URL:** https://discourse.julialang.org/t/implementing-two-different-noise-processes-in-a-differential-equation/101908
**Category:** Numerics
**Tags:** question
**Created:** [July 21, 2023, 8:38pm UTC](https://discourse.julialang.org/t/implementing-two-different-noise-processes-in-a-differential-equation/101908 "2023-07-21T20:38:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![absorbtion](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@absorbtion](https://discourse.julialang.org/u/absorbtion)
#### Post date: [July 21, 2023, 8:38pm UTC](https://discourse.julialang.org/t/implementing-two-different-noise-processes-in-a-differential-equation/101908/1 "2023-07-21T20:38:50Z")

</div>

Hi! I’m trying to implement the 3-dim complex valued DE  
`du/dt = (alpha(t) + beta(t))*u(t)`

`alpha(t)` is a 3-dim OU process and `beta(t) `is a 1-dim OU process (mean 0) with a given covariance E[beta(t)beta(s)] = f(s,t).

I tried to solve the DE with both SDEProblem and RODEProblem. Both methods work well when there is just one noise, but I don’t know how to implement the DE with two noises.

```julia
function f(du, u, p, t, W)
    du .= u .* (W[1] + W[2])
end

W = [alpha, beta]

prob = RODEProblem(f, u0, tspan, noise = W, noise_prototype = zeros(2, 3))

```

does not work (because W is not 1 process). Also in SDE I don’t know how to do it. Is there another function I could use?

Could someone please help me? Thanks in advance!

---

<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: [June 15, 2024, 10:01am UTC](https://discourse.julialang.org/t/implementing-two-different-noise-processes-in-a-differential-equation/101908/2 "2024-06-15T10:01:47Z")

</div>

What you’re describing is just a non-diagonal noise problem. See this tutorial:

> **[Stochastic Differential Equations · DifferentialEquations.jl](https://docs.sciml.ai/DiffEqDocs/stable/tutorials/sde_example/#Example-4:-Systems-of-SDEs-with-Non-Diagonal-Noise)**
>
> Documentation for DifferentialEquations.jl.
