Why Can't `DSolve` Find a Solution for this ODE with y[-x]
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I wanted to find a accuracy solution of the following ODE.
$$y'(x)+y(x)=-y(-x).$$
But when I try to use DSolve
as follows
DSolve[y'[x] + y[x] == -y[-x], y[x], x]
I get a warning message:
DSolve::litarg: To avoid possible ambiguity, the arguments of the dependent variable in y[x]+(y^[Prime])[x]==-y[-x] should literally match the independent variables.
How can I solve this equation with $y(-x)$?
differential-equations
New contributor
slogvintage is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
1
down vote
favorite
I wanted to find a accuracy solution of the following ODE.
$$y'(x)+y(x)=-y(-x).$$
But when I try to use DSolve
as follows
DSolve[y'[x] + y[x] == -y[-x], y[x], x]
I get a warning message:
DSolve::litarg: To avoid possible ambiguity, the arguments of the dependent variable in y[x]+(y^[Prime])[x]==-y[-x] should literally match the independent variables.
How can I solve this equation with $y(-x)$?
differential-equations
New contributor
slogvintage is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2
As the warning message says, the argument to the dependent variable must be exactly the same as in the last parameter. This is like as if you wroteDSolve[ y'[x]+1==y[z],y[x],x]
. May be if you explain what you want to writey[-x]
in there instead ofy[x]
it will help.
– Nasser
4 hours ago
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I wanted to find a accuracy solution of the following ODE.
$$y'(x)+y(x)=-y(-x).$$
But when I try to use DSolve
as follows
DSolve[y'[x] + y[x] == -y[-x], y[x], x]
I get a warning message:
DSolve::litarg: To avoid possible ambiguity, the arguments of the dependent variable in y[x]+(y^[Prime])[x]==-y[-x] should literally match the independent variables.
How can I solve this equation with $y(-x)$?
differential-equations
New contributor
slogvintage is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I wanted to find a accuracy solution of the following ODE.
$$y'(x)+y(x)=-y(-x).$$
But when I try to use DSolve
as follows
DSolve[y'[x] + y[x] == -y[-x], y[x], x]
I get a warning message:
DSolve::litarg: To avoid possible ambiguity, the arguments of the dependent variable in y[x]+(y^[Prime])[x]==-y[-x] should literally match the independent variables.
How can I solve this equation with $y(-x)$?
differential-equations
differential-equations
New contributor
slogvintage is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
slogvintage is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 4 hours ago


AccidentalFourierTransform
4,6771839
4,6771839
New contributor
slogvintage is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 5 hours ago
slogvintage
63
63
New contributor
slogvintage is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
slogvintage is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
slogvintage is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2
As the warning message says, the argument to the dependent variable must be exactly the same as in the last parameter. This is like as if you wroteDSolve[ y'[x]+1==y[z],y[x],x]
. May be if you explain what you want to writey[-x]
in there instead ofy[x]
it will help.
– Nasser
4 hours ago
add a comment |Â
2
As the warning message says, the argument to the dependent variable must be exactly the same as in the last parameter. This is like as if you wroteDSolve[ y'[x]+1==y[z],y[x],x]
. May be if you explain what you want to writey[-x]
in there instead ofy[x]
it will help.
– Nasser
4 hours ago
2
2
As the warning message says, the argument to the dependent variable must be exactly the same as in the last parameter. This is like as if you wrote
DSolve[ y'[x]+1==y[z],y[x],x]
. May be if you explain what you want to write y[-x]
in there instead of y[x]
it will help.– Nasser
4 hours ago
As the warning message says, the argument to the dependent variable must be exactly the same as in the last parameter. This is like as if you wrote
DSolve[ y'[x]+1==y[z],y[x],x]
. May be if you explain what you want to write y[-x]
in there instead of y[x]
it will help.– Nasser
4 hours ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
4
down vote
Take
$$
y'(x)+y(x)+y(-x)=0
$$
Write the same equation, with $xto-x$:
$$
y'(-x)+y(x)+y(-x)=0
$$
and subtract the two equations:
$$
y'(x)-y'(-x)=0
$$
Integrate this equation:
$$
y(x)+y(-x)=2y(0)
$$
and plug this back into the initial equation:
$$
y'(x)+2y(0)=0
$$
with solution
$$
y(x)=y(0)(1-2x)
$$
It is easy to check that this solves the initial equation:
y'[x] + y[x] == -y[-x] /. y -> ((-2 y[0] # + y[0]) &)
(* True *)
I hope I didn't mess up the algebra though, so please double check everything.
add a comment |Â
up vote
1
down vote
Put g[x] =f[-x]
, change the sign x
in the equation, then we get a system of two equations that has a solution
DSolve[f'[x] + f[x] + g[x] == 0, -g'[x] + g[x] + f[x] ==
0, f, g, x]
Out= f -> Function[x, (1 - x) C[1] - x C[2]],
g -> Function[x, x C[1] + (1 + x) C[2]]
From the condition g[x] =f[-x]
we find C[1] = C[2]
1
You could also addf'[0] + 2f[0] == 0
as in @AccidentalFourierTransform's answer.
– Carl Woll
2 hours ago
Thank you. We can also use the conditiong[x]=f[-x]
– Alex Trounev
2 hours ago
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
Take
$$
y'(x)+y(x)+y(-x)=0
$$
Write the same equation, with $xto-x$:
$$
y'(-x)+y(x)+y(-x)=0
$$
and subtract the two equations:
$$
y'(x)-y'(-x)=0
$$
Integrate this equation:
$$
y(x)+y(-x)=2y(0)
$$
and plug this back into the initial equation:
$$
y'(x)+2y(0)=0
$$
with solution
$$
y(x)=y(0)(1-2x)
$$
It is easy to check that this solves the initial equation:
y'[x] + y[x] == -y[-x] /. y -> ((-2 y[0] # + y[0]) &)
(* True *)
I hope I didn't mess up the algebra though, so please double check everything.
add a comment |Â
up vote
4
down vote
Take
$$
y'(x)+y(x)+y(-x)=0
$$
Write the same equation, with $xto-x$:
$$
y'(-x)+y(x)+y(-x)=0
$$
and subtract the two equations:
$$
y'(x)-y'(-x)=0
$$
Integrate this equation:
$$
y(x)+y(-x)=2y(0)
$$
and plug this back into the initial equation:
$$
y'(x)+2y(0)=0
$$
with solution
$$
y(x)=y(0)(1-2x)
$$
It is easy to check that this solves the initial equation:
y'[x] + y[x] == -y[-x] /. y -> ((-2 y[0] # + y[0]) &)
(* True *)
I hope I didn't mess up the algebra though, so please double check everything.
add a comment |Â
up vote
4
down vote
up vote
4
down vote
Take
$$
y'(x)+y(x)+y(-x)=0
$$
Write the same equation, with $xto-x$:
$$
y'(-x)+y(x)+y(-x)=0
$$
and subtract the two equations:
$$
y'(x)-y'(-x)=0
$$
Integrate this equation:
$$
y(x)+y(-x)=2y(0)
$$
and plug this back into the initial equation:
$$
y'(x)+2y(0)=0
$$
with solution
$$
y(x)=y(0)(1-2x)
$$
It is easy to check that this solves the initial equation:
y'[x] + y[x] == -y[-x] /. y -> ((-2 y[0] # + y[0]) &)
(* True *)
I hope I didn't mess up the algebra though, so please double check everything.
Take
$$
y'(x)+y(x)+y(-x)=0
$$
Write the same equation, with $xto-x$:
$$
y'(-x)+y(x)+y(-x)=0
$$
and subtract the two equations:
$$
y'(x)-y'(-x)=0
$$
Integrate this equation:
$$
y(x)+y(-x)=2y(0)
$$
and plug this back into the initial equation:
$$
y'(x)+2y(0)=0
$$
with solution
$$
y(x)=y(0)(1-2x)
$$
It is easy to check that this solves the initial equation:
y'[x] + y[x] == -y[-x] /. y -> ((-2 y[0] # + y[0]) &)
(* True *)
I hope I didn't mess up the algebra though, so please double check everything.
answered 4 hours ago


AccidentalFourierTransform
4,6771839
4,6771839
add a comment |Â
add a comment |Â
up vote
1
down vote
Put g[x] =f[-x]
, change the sign x
in the equation, then we get a system of two equations that has a solution
DSolve[f'[x] + f[x] + g[x] == 0, -g'[x] + g[x] + f[x] ==
0, f, g, x]
Out= f -> Function[x, (1 - x) C[1] - x C[2]],
g -> Function[x, x C[1] + (1 + x) C[2]]
From the condition g[x] =f[-x]
we find C[1] = C[2]
1
You could also addf'[0] + 2f[0] == 0
as in @AccidentalFourierTransform's answer.
– Carl Woll
2 hours ago
Thank you. We can also use the conditiong[x]=f[-x]
– Alex Trounev
2 hours ago
add a comment |Â
up vote
1
down vote
Put g[x] =f[-x]
, change the sign x
in the equation, then we get a system of two equations that has a solution
DSolve[f'[x] + f[x] + g[x] == 0, -g'[x] + g[x] + f[x] ==
0, f, g, x]
Out= f -> Function[x, (1 - x) C[1] - x C[2]],
g -> Function[x, x C[1] + (1 + x) C[2]]
From the condition g[x] =f[-x]
we find C[1] = C[2]
1
You could also addf'[0] + 2f[0] == 0
as in @AccidentalFourierTransform's answer.
– Carl Woll
2 hours ago
Thank you. We can also use the conditiong[x]=f[-x]
– Alex Trounev
2 hours ago
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Put g[x] =f[-x]
, change the sign x
in the equation, then we get a system of two equations that has a solution
DSolve[f'[x] + f[x] + g[x] == 0, -g'[x] + g[x] + f[x] ==
0, f, g, x]
Out= f -> Function[x, (1 - x) C[1] - x C[2]],
g -> Function[x, x C[1] + (1 + x) C[2]]
From the condition g[x] =f[-x]
we find C[1] = C[2]
Put g[x] =f[-x]
, change the sign x
in the equation, then we get a system of two equations that has a solution
DSolve[f'[x] + f[x] + g[x] == 0, -g'[x] + g[x] + f[x] ==
0, f, g, x]
Out= f -> Function[x, (1 - x) C[1] - x C[2]],
g -> Function[x, x C[1] + (1 + x) C[2]]
From the condition g[x] =f[-x]
we find C[1] = C[2]
edited 2 hours ago
answered 3 hours ago


Alex Trounev
3,0951312
3,0951312
1
You could also addf'[0] + 2f[0] == 0
as in @AccidentalFourierTransform's answer.
– Carl Woll
2 hours ago
Thank you. We can also use the conditiong[x]=f[-x]
– Alex Trounev
2 hours ago
add a comment |Â
1
You could also addf'[0] + 2f[0] == 0
as in @AccidentalFourierTransform's answer.
– Carl Woll
2 hours ago
Thank you. We can also use the conditiong[x]=f[-x]
– Alex Trounev
2 hours ago
1
1
You could also add
f'[0] + 2f[0] == 0
as in @AccidentalFourierTransform's answer.– Carl Woll
2 hours ago
You could also add
f'[0] + 2f[0] == 0
as in @AccidentalFourierTransform's answer.– Carl Woll
2 hours ago
Thank you. We can also use the condition
g[x]=f[-x]
– Alex Trounev
2 hours ago
Thank you. We can also use the condition
g[x]=f[-x]
– Alex Trounev
2 hours ago
add a comment |Â
slogvintage is a new contributor. Be nice, and check out our Code of Conduct.
slogvintage is a new contributor. Be nice, and check out our Code of Conduct.
slogvintage is a new contributor. Be nice, and check out our Code of Conduct.
slogvintage is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f183870%2fwhy-cant-dsolve-find-a-solution-for-this-ode-with-y-x%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
As the warning message says, the argument to the dependent variable must be exactly the same as in the last parameter. This is like as if you wrote
DSolve[ y'[x]+1==y[z],y[x],x]
. May be if you explain what you want to writey[-x]
in there instead ofy[x]
it will help.– Nasser
4 hours ago