When I saw CNN’s Jake Tapper suddenly blurt out, “What the hell is going on?” in an online video the other day, I thought I’d better speak up.

Like millions of people around the world, Tapper has become increasingly baffled by President Donald Trump’s odd behaviors: sucking up to Russian President Vladimir Putin in Helsinki, then rewriting his own words the next day; scolding British Prime Minister Theresa May in an interview in The Sun, then denying that he ever did so when he was in May’s presence hours later; lying, reversing himself, lying again, then lying about the lies.

Come up with your own list of peculiar and often contradictory Trump statements — about women, the Access Hollywood tape, immigrants, Charlottesville, gun rights, you name it. The bottom line, more and more, seems to be that exasperating question, “What the hell is going on?”

Trump is not mentally ill, and I doubt he is even “living in his own reality,” as so many have claimed. He is simply fairly unique in a way that is hard for the public to understand. In a nutshell, Trump is highly vulnerable to what can reasonably be called “sympathetic audience control.”

If that sounds jargony, I apologize. It’s actually a pretty simple concept and, in Trump’s case, it explains a lot — maybe even 90 percent of the behavior that seems so baffling.

All normal people are subject to “audience control” to one degree or another. That means simply that they regulate what they say and do based on who’s around them. They are respectful sitting in a church pew, a bit more daring sitting in a classroom, and somewhat wild sitting in the bleachers. Audience control doesn’t usually cause problems, and it also usually doesn’t persist when the audience is gone. But for Trump, audience control works in a special way:

When Trump is in the presence of someone he dislikes or distrusts, he attacks and will continue to lash out for a while, but not necessarily forever. When someone he perceives as a threat becomes deferential (Rocket Man, for example), Trump not only stops attacking, he also becomes highly vulnerable to influence.

In general, when Trump is around someone whom he perceives as supportive, or when he gets a phone call from a supportive billionaire, or when he hears a supportive commentator on Fox News, his thinking is rapidly influenced by what that person is saying. This is “sympathetic audience control.” With Trump, the impact is so strong that it persists after the person is gone — maybe even until another sympathetic individual comes along.

When Trump is in front of a large group of cheering people, his thinking is fully controlled by the crowd. It might seem he’s in control, but the opposite is actually the case. The supportive audience completely dominates his thinking, causing him to repeat, over and over, things he believes the audience wants to hear.

We need to add just one more element here to make sense of Trump’s roller coaster mind: Like my 92-year-old mom, Trump lives in a very small window of time, and no, I don’t mean he lives “in the moment” in that healthy, New-Age-y sort of way. I mean he has trouble looking backwards or forwards in time.

You might think he formulates and lives by long-term plans and strategies, but I doubt that very much. He is much more like a rudderless sailboat blown about by the wind, with the direction largely determined moment-to-moment according to who’s got his attention and whether he views that person as friend or foe.

If I’m right, and I’m pretty sure I am, Trump is capable of only a minimal level of analytical or critical thinking. Perhaps more alarming, our president — the putative leader of the free world — doesn’t believe in anything and he rarely, if ever, means anything he says.

Robert Epstein, senior research psychologist at the American Institute for Behavioral Research and Technology, is a former editor in chief of Psychology Today and the author of 15 books. Follow him on Twitter: @DrREpstein