By Damian Grammaticas
BBC News, Beijing
Mr Obama's visit to China was tightly scripted
Among the many images of the last leg of President Obama's tour of Asia in China and South Korea, one will stay with me longer than most.
It is not Barack Obama striding along the Great Wall of China, nor him meeting the leaders of China or South Korea and speaking of partnership and weighty global issues like nuclear disarmament, climate change and the global economy.
No, it is of the US's president side by side with China's president at the state banquet in Beijing.
The two presidents are watching a live cultural performance. It is all a little stiff and formal. On President Obama's face is a smile, which could have a hint of weariness. President Hu is impassive.
On stage, 60 young men and women, most Chinese, but a few foreigners too - including a couple of young Africans - sway and clap as they sing and dance in unison.
The choice of song seems designed to send a not-so-subtle message to the honoured guest.
It is the classic hit That's What Friends are For, written by Burt Bacharach and Carole Bayer Sager, and performed famously by Dionne Warwick, Gladys Knight, Elton John and Stevie Wonder.
They sing: "Keep smiling, keep shining. Knowing you can always count on me. For sure, that's what friends are for."
There could hardly be a more appropriate song for a visit where America's president has come offering a hand of friendship, saying he welcomes China's rise in the world and is looking to build a partnership with China to tackle the biggest issues at the global level.
It is a message designed to soothe traditional Chinese fears that America is bent on encircling China and preventing it from becoming a great power again.
But to the casual observer it just looked a bit too choreographed, with no spontaneity or chemistry apparent between these friends. So did this visit to China and South Korea show what friends are for?
In China, President Obama seemed to be deploying all his charm, beaming broad smiles, praising the Forbidden City and the "greatness of Chinese civilisation".
China's leaders reciprocated a little stiffly; they are, after all, less used to having to perform in public.
But look closer and there does not seem to be all that much substance to the friendship.
On the big issues America and China hardly strike you as the sort of friends who can be, in the words of the song "on your side forever more, in good times, in bad times".
They agreed to work together for a climate change deal in Copenhagen. But that is not the same as agreeing on what they will actually do about climate change.
There was not much substance either when it came to fixing the huge trade imbalance between the US and China, to the thorny issues of whether China's currency is undervalued or America resorting to protectionism.
There was not much sign of the sort of co-operation that will help the global economy recover and ensure it is not vulnerable to another great downturn like the one we have just seen.
And China and America are not yet the sort of friends who can listen comfortably to each other's criticisms.
Mr Obama seemed more at ease with South Korea's Lee Myung-bak
President Obama's meeting with handpicked students in Shanghai -where he spoke of the importance of freedoms, of political participation, of an internet that is not controlled - was not broadcast live on national TV.
His more sensitive comments were not reported on the main evening news, in newspapers or allowed to be discussed online.
On the thorny issue of North Korea and its nuclear weapons there was agreement to deal with the issue through talks.
Neither wants North Korea to possess the bomb, and neither wants North Korea's regime to crumble, which could set off a dangerous dynamic on the Korean peninsula. But on this subject too, America and China do not really have much in common beyond that.
Contrast all this with the images from South Korea.
There, President Obama stood side-by-side with South Korea's President Lee Myung-bak.
They joked and hugged and Mr Obama spoke of the need for North Korea to "break the pattern of the past".
A lonely figure on the Great Wall of China
The leaders did not flinch from taking tough questions from journalists at their joint press conference.
In China there was simply a joint statement. Journalists had to listen obediently. No questions were allowed.
Does President Hu not feel comfortable answering unscripted questions? We could not ask so we do not know.
But it begs the question is this a friendship where everything has to be scripted? If so it is hardly likely to survive the bad times.
So maybe an image that better reflects Mr Obama's visit to the region is of him alone on the Great Wall of China.
A lonely figure striding on top of a wall that is a symbol of the way China has, for centuries, tried to keep foreigners at bay, to shield itself from their disruptive influences.
The Great Wall was a photo-opportunity, all substance but no real engagement.
Mr Obama came to China hoping charm and engagement would help break down the walls that still separate America and China.
He leaves the region with what looks like little to show for his efforts. Perhaps he has done enough to lay the foundations for a real friendship in future.
After all, up to the final wave he gave from the door of Air Force One, Mr Obama did try to "keep smiling, keep shining".