numerical integration and solving for limit

hello everyone, this is my first question here.
I'm trying to find the value of x when t equals 1:0.1:10
So I don't know how to solve this problem, for example if the intervals were fixed and I wanted to find t, I would just use the commands
f(x)= (-1./(sqrt((1-x.^2)+(0.01/2)*(1-x.^4))))
a=1;
b=5;
I=int(f(x),a,b);
Can anybody help me?
how do i find the value of b when t is equal to 1:0.1:10.
Thanks for your help.

 Respuesta aceptada

Torsten
Torsten el 19 de En. de 2023
Editada: Torsten el 19 de En. de 2023
Here is the maximum value you can insert for t:
syms x
f = 1/sqrt((1-x^2)+0.01/2*(1-x^4));
vpaintegral(f,x,-1,1)
ans = 
3.12988
And here is the curve of t against x.
You can cheat here: plot x against t and say you solved t = -integral ... for x. :-)
xstart = -1;
xend = 1;
xnum = linspace(xstart,xend,100);
for i=1:numel(xnum)
tnum(i) = double(vpaintegral(f,x,xnum(i),1));
end
plot(xnum,tnum)

4 comentarios

Walter Roberson
Walter Roberson el 19 de En. de 2023
oh good point, the upper bound has to be in the range -1 to +1 (lower than the lower bound!) in order to not get a complex result.
Walter Roberson
Walter Roberson el 19 de En. de 2023
It looks to me as if -1 to +1 has an area of π so the t bounds would be 0 to π. It is the x bounds that must be -1 to 1 but the result of the integral can be larger than 1
Torsten
Torsten el 19 de En. de 2023
Yes, I plotted x against the value of the integral.
PTK
PTK el 19 de En. de 2023
Thank you so much!

Iniciar sesión para comentar.

Más respuestas (1)

Walter Roberson
Walter Roberson el 19 de En. de 2023

0 votos

your f has x^4 and x^2 but no other powers of x.
Do a change of variables X2=x^2 and integrate with respect to X2. You will get a closed form integral involving arcsin. Transform back from X2 to x. Now you can solve the equation. Just make sure you get the right limits of integration

2 comentarios

PTK
PTK el 19 de En. de 2023
Thank you.
Walter Roberson
Walter Roberson el 20 de En. de 2023
The problem with this approach turns out to be that you would need x^2 to be negative to get at some of the values, which is a problem because that gets you into complex-valued x.

Iniciar sesión para comentar.

Productos

Versión

R2022a

Preguntada:

PTK
el 19 de En. de 2023

Comentada:

el 20 de En. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by