How do I solve for the upper bound of a definite integral when I know what the integral is equal to?

11 views (last 30 days)
Hers is what I am trying to solve:
The integral dx/(a1*sin(wx)+a2*sin(3wx) from xo to xt = C.
I know the values of everything except xt and I need to figure out how to get matlab to solve for it numerically.

Answers (1)

Torsten
Torsten on 10 Mar 2015
Edited: Torsten on 1 Apr 2019
a1=...;
a2=...;
w=...;
xo=...;
value_integral=...;
sol = fzero(@(C)((integral(@(x)1./(a1*sin(w*x)+a2*sin(3*w*x)))-value_integral,xo,C)),1);
where value_integral is the known value of the integral.
Best wishes
Torsten.
  4 Comments

Sign in to comment.

Categories

Find more on Debugging and Analysis 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!