MATLAB: I need to make integrat for this equation from 0 to x ,, with respect to x ,,i make several program but i cant reach to the object

integrationsimulation

y= sqrt(2*m*(E-(a.*x)))
where m,E,A, IS constant

Best Answer

Hi,
syms g(x) a m E
g(x) = (sqrt(2*m*(E-(a.*x))))
G(x) = int(g(x),x)
pretty(G(x))
gives the indefinite integral, which is:
G(x) =
-(2*2^(1/2)*(m*(E - a*x))^(1/2)*(E - a*x))/(3*a)
or by using pretty:
2 sqrt(2) sqrt(m (E - a x)) (E - a x)
- -------------------------------------
3 a
Best regards
Stephan