Thevenins theorem with dependent sources