German Chancellor Angela Merkel has said she can work with the UK to reform the European Union but it will not be "a piece of cake".
Following a Downing Street meeting with Prime Minister David Cameron, she said both countries could bring in laws to restrict benefit tourism, as part of "overall European cooperation".
Mr Cameron said changes to the EU were "possible, achievable and doable".
Mrs Merkel addressed Parliament earlier - and later had tea with the Queen.
She also had a meeting with Mr Cameron in Downing Street, with a picture being released of the two of them chatting on the sofa in the Camerons' flat.
Mr Cameron is keen to negotiate changes to the UK's treaties with the EU ahead of a promised referendum on whether the country should remain in the organisation, which he wants to hold before the end of 2017.
He regards Mrs Merkel as a key figure in achieving his aim and has organised several events to welcome the German leader during her one-day visit to London, including tea with the Queen at Buckingham Palace.
At the Downing Street press conference, Mr Cameron said he and Mrs Merkel "both want to see changes in Europe".
He added that EU rules on freedom of movement needed to change to ensure people could not move from country to country to sign up for welfare payments.
Mrs Merkel said the UK and Germany could pass laws to limit this problem, saying: "Where there's a will, there's a way."
She said freedom of movement was intended to allow people to work in different countries, not "having immigration into social systems".
However, speaking of changing the EU, she said: "It is not a piece of cake. It is going to be hard work."
Earlier, Mrs Merkel addressed both Houses of Parliament.
Leaders previously accorded the honour include French Presidents Charles de Gaulle, pictured above, Valery Giscard d'Estaing and Francois Mitterrand, US presidents Bill Clinton and Barack Obama, the Dalai Lama, Burmese politician Aung San Suu Kyi and former Russian president Boris Yeltsin - click here for a full list.
Mrs Merkel told assembled political and business leaders: "Some expect my speech to pave the way for a fundamental reform of the European architecture which will satisfy all kinds of alleged or actual British wishes. I am afraid they are in for a disappointment.
"Others are expecting the exact opposite and they are hoping that I will deliver the clear and simple message here in London that the rest of Europe is not prepared to pay almost any price to keep Britain in the European Union. I am afraid these hopes will be dashed."'
Mrs Merkel hailed the peace and stability she said the European Union had brought, saying war between EU member states was now "inconceivable".
She praised the "unparalleled success" of the EU free market - and the freedoms she said European integration had delivered - but stressed that "we need to change the political shape of the EU in keeping with the times".
She told the UK's gathered political leaders the SU had to become stronger, saying: "In order to attain this goal we need a strong United Kingdom with a strong voice inside the European Union.
"If we have that, we will be able to make the necessary changes for the benefit of all."
The Guardian reported on Wednesday that Berlin was prepared to offer "limited opt-outs" to the UK over its future compliance with existing EU directives and to make sure some other regulations were more flexibly enforced.
The newspaper said it was a sign of the lengths that Germany was willing to go to to ensure the UK remained a member of the EU amid fears in Europe that a referendum could lead to British withdrawal.
But BBC Berlin Correspondent Stephen Evans said sources close to Mrs Merkel were playing down expectations of new proposals for the kind of changes British Conservatives wanted to see.
Although not an official state visit - Mrs Merkel is not head of state - the trip has been planned for months, with both governments aware of its political significance at a time of looming change in Europe.
Mr Cameron has said that if the Conservatives win the 2015 election, he will seek to renegotiate the terms of the UK's membership of the European Union and put the outcome to an in-out referendum of the British people in 2017.
But he faces a battle to convince leaders of other EU member states to agree to the treaty changes he will need, with French President Francois Hollande recently telling the prime minister, on a one-day visit to the UK, that it was "not a priority".
The leader of Mr Cameron's junior coalition partners, the Liberal Democrat Deputy Prime Minister Nick Clegg, and opposition leader Ed Miliband, who both oppose calls for a referendum and who have warned that Conservative calls for a root-and-branch renegotiation will alienate EU leaders, also held separate meetings with Mrs Merkel.