By default I think quad calls qagse which does support singularities, you can also specify a series of domains to avoid them. With the right set of options you can get to most of the quadpack routines.
You need to include the cross terms in the outer product. The density matrix for your pure state ##|\psi\rangle## is ##\rho= |\psi\rangle\langle\psi|## which includes terms like ##|00\rangle\langle 01|##
For part (ii) of task 1 you want to write ## y = av_1 + bv_2 + cv_3 ## and find ##a##, ##b## and ##c##. What happens if you e.g. take the inner product of this equation with ##v_1##?
Not quite. The function g(t) is even but you are integrating g(t)e^{j\omega t} which isn't even, so you need to do the other half of the integral, or notice that the negative time part is the complex conjugate of the positive time part.
The Fourier transform of a Lorentzian isn't a Lorentzian (its a decaying oscillation)
The Fourier transform of a Gaussian is a Gaussian, which is I guess what you mean?
Do you know any theorems about the Fourier transform of a derivative to help answer your other question?
If you do something like
fullscreen = get(0,'ScreenSize');
set(0, 'DefaultFigurePosition', [0 -50 fullscreen(3) fullscreen(4)])
before plotting anything then it will set the default size for new figures to be maximised.
Hope that helps :-)
Not quite, this is why the constant of integration is important. The first integration gives
\frac{df}{dx}=\frac{x^4}{4}+5x+c_1
and the second integration gives
f(x)=\frac{x^5}{20}+\frac{5x^2}{2}+c_1x+c_2
Which is why we need one constant of integration for each integral
But it's fine as an operator equality
\frac{1}{r}\frac{\partial^2r\psi}{\partial r^2}=\frac{\partial^2\psi}{\partial r^2}+\frac{2}{r}\frac{\partial\psi}{\partial r}
I think glyvin wants a set of zeros inside a a vector with only ones at each end.
This can be done fairly simply with something like
x=zeros(n,1);
x(1)=1; x(end)=1;
The derivative of a delta function has the property
\int_{-\infty}^\infty\delta'(t)f(t)dt=-f'(0)
In your equation you should have a term like
\delta'(\tau)(e^{i\omega\tau}+e^{-i\omega\tau})
which at \tau=0 has a derivative which goes away so this term gives no contribution.
Hope that...
The derivative of \Theta(t) is \delta(t). You can then use this result, along with the fact that the second derivative of \Theta(t) is peaked at t=0 (so that these terms cancel) to find \partial^2_t G and substitute to find the answer.
If you want any more details please show what you have...
Instead of using the complicated function above, you could just do something like
abs(V3c-V3(2))<epsilon
where you set epsilon as the tolerance you want to keep. This then returns a logical with ones where the two things were equal.
Hope that helps :smile:
The fact that two functions cross at a particular point does not mean that their derivative is the same.
You could do the same thing with much simpler functions eg f(x)=x, g(x)=2x these cross at x=0 but they obviously don't have the same gradient.
Your answer cannot be a function of x, since you are integrating over x. Try substituting your expression for \Psi(x) from your first post before you integrate.
size(A,n) returns the length along the nth dimension of the matrix A.
This means that for a 2x2 matrix (i.e a 2D matrix) for n>2 we have that size(A,n)=1 but for n=1,2 size(A,n)=2 since it is only in the first two dimensions that the matrix has any entries.
The Bessel function can be written as a generalised power series:
J_m(x) = \sum_{n=0}^\infty \frac{(-1)^n}{ \Gamma(n+1) \Gamma(n+m+1)} ( \frac{x}{2})^{2n+m}
Using this show that:
\sqrt{\frac{ \pi x}{2}} J_{1/2}(x)=\sin{x}
where...