# Large initial values in DAE system

**URL:** https://discourse.julialang.org/t/large-initial-values-in-dae-system/43592
**Category:** Modelling & Simulations
**Tags:** diffeq
**Created:** [July 23, 2020, 10:17pm UTC](https://discourse.julialang.org/t/large-initial-values-in-dae-system/43592 "2020-07-23T22:17:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lob](https://avatars.discourse-cdn.com/v4/letter/l/ecae2f/32.png) [@lob](https://discourse.julialang.org/u/lob)
#### Post date: [July 23, 2020, 10:17pm UTC](https://discourse.julialang.org/t/large-initial-values-in-dae-system/43592/1 "2020-07-23T22:17:13Z")

</div>

Hi all,

I am trying to solve a DAE system using **DifferentialEquations.jl** where initial values can be relatively large (order 1e22). The MWE below (algebraic equations omitted) solves fine up to `n0[1] = 1e15` but throws an IDAS error when I increase this value further. Therefore I was wondering whether there is any fundamental limitation of usable n0 in this example, and if so, why?

```julia
using DifferentialEquations
using Plots

function func(r,dn,n,param,t)
    r[1] = -n[1] + n[2] - dn[1]
    r[2] = +n[1] - n[2] - dn[2]
end

n0 = [1.0e15, 0]
dn0 = [0.0, 0.0]
diff_var = [true, true]
tspan = [0.0, 1e1]
param = []
prob = DAEProblem(func,dn0,n0,tspan,param,differential_vars=diff_var)

sol = solve(prob)
Plots.plot(sol)

```

Here the full error message:

```julia
[IDAS ERROR] IDACalcIC
  The residual routine or the linear setup or solve routine had a recoverable error, but IDACalcIC was unable to recover.

```

In principle I could probably get around this by using a lower n0 and scaling other parameters accordingly, but with a number of algebraic equations that require scaling this can become a little troublesome.
