I have a function beta defined as an integral. I want to define another function alpha "being the integral of that function".

9 views (last 30 days)
In particular I want to solve the differential equation d alpha(s)/ds = 1/2* beta(s)^2 and get the function alpha. Beta is defined as follows:
fun1=@(x) -exp((-c*x*b+a*exp(-b*x)-a)/b); beta=@(k) (exp(-(-c*k*b+a*exp(-b*k)-a)/b)*integral(fun1,0,k)); The problem is that I can't for example do something like alpha= @(x) integral(beta,0,x)

Answers (1)

Torsten
Torsten on 12 Apr 2017
Edited: Torsten on 12 Apr 2017
Solve
d(alpha)/ds = 0.5*(exp(-(-c*s*b+a*exp(-b*s)-a)/b)*y)^2
dy/ds = -exp((-c*s*b+a*exp(-b*s)-a)/b)
alpha(0) = alpha0
y(0) = 0
using an ODE integrator.
Best wishes
Torsten.
  2 Comments
giorgione palma
giorgione palma on 13 Apr 2017
thanks for your answer but I was more thinking about computing the integral rather than solve an ODE. I think there must be a way to compute the numeric integral such fun= @(t) int(f(s) * int(g(z), z == (0..s)), s == (0..t))

Sign in to comment.

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!