Simple Differential Equation in Matlab and Wolfram get two different answer?A simple second order differential equationTwo Matlab ODE solvers, two different resultssolving system of ordinary differential equation with ODE solver of matlabSolution to Basic ODE using Matlab?Two couple equation first order Runge Kutta Matlab troubles?Differential Equation and MatlabIs this differential equation solvable in MATLAB?Formulating a linear difference equation model and some MatLab tipsAnalyzing a population governed by a nonlinear difference equation and matlab (Hassel's model)Calculating value of $textsinc(x)$, WolframAlpha and MATLAB give two different answers.
Why does the negative sign arise in this thermodynamic relation?
Does the nature of the Apocalypse in The Umbrella Academy change from the first to the last episode?
Can Mathematica be used to create an Artistic 3D extrusion from a 2D image and wrap a line pattern around it?
When traveling to Europe from North America, do I need to purchase a different power strip?
What's the "normal" opposite of flautando?
How is the wildcard * interpreted as a command?
Single word request: Harming the benefactor
Recommendation letter by significant other if you worked with them professionally?
Plausibility of Mushroom Buildings
Find longest word in a string: are any of these algorithms good?
Can you reject a postdoc offer after the PI has paid a large sum for flights/accommodation for your visit?
Signed and unsigned numbers
Conservation of Mass and Energy
Could you please stop shuffling the deck and play already?
Do f-stop and exposure time perfectly cancel?
Is it necessary to separate DC power cables and data cables?
Makefile strange variable substitution
Why the color red for the Republican Party
Can one live in the U.S. and not use a credit card?
Difference on montgomery curve equation between EFD and RFC7748
Why does Captain Marvel assume the people on this planet know this?
How to detect if C code (which needs 'extern C') is compiled in C++
What are actual Tesla M60 models used by AWS?
Motivation for Zeta Function of an Algebraic Variety
Simple Differential Equation in Matlab and Wolfram get two different answer?
A simple second order differential equationTwo Matlab ODE solvers, two different resultssolving system of ordinary differential equation with ODE solver of matlabSolution to Basic ODE using Matlab?Two couple equation first order Runge Kutta Matlab troubles?Differential Equation and MatlabIs this differential equation solvable in MATLAB?Formulating a linear difference equation model and some MatLab tipsAnalyzing a population governed by a nonlinear difference equation and matlab (Hassel's model)Calculating value of $textsinc(x)$, WolframAlpha and MATLAB give two different answers.
$begingroup$
I'm a beginner in using Matlab. if I have a DE like
$$x'(t)=frac1sin (2x)$$
How I can Implement in Matlab to calculate just answer?
I try dsolve like as:
ySol(t) = dsolve(ode,cond)
but couldn't define ode, and cond.
Update: this is my matlab:
and different answer from Wolfram:
ordinary-differential-equations matlab wolfram-alpha
$endgroup$
add a comment |
$begingroup$
I'm a beginner in using Matlab. if I have a DE like
$$x'(t)=frac1sin (2x)$$
How I can Implement in Matlab to calculate just answer?
I try dsolve like as:
ySol(t) = dsolve(ode,cond)
but couldn't define ode, and cond.
Update: this is my matlab:
and different answer from Wolfram:
ordinary-differential-equations matlab wolfram-alpha
$endgroup$
add a comment |
$begingroup$
I'm a beginner in using Matlab. if I have a DE like
$$x'(t)=frac1sin (2x)$$
How I can Implement in Matlab to calculate just answer?
I try dsolve like as:
ySol(t) = dsolve(ode,cond)
but couldn't define ode, and cond.
Update: this is my matlab:
and different answer from Wolfram:
ordinary-differential-equations matlab wolfram-alpha
$endgroup$
I'm a beginner in using Matlab. if I have a DE like
$$x'(t)=frac1sin (2x)$$
How I can Implement in Matlab to calculate just answer?
I try dsolve like as:
ySol(t) = dsolve(ode,cond)
but couldn't define ode, and cond.
Update: this is my matlab:
and different answer from Wolfram:
ordinary-differential-equations matlab wolfram-alpha
ordinary-differential-equations matlab wolfram-alpha
edited Mar 7 at 8:36
Dylan
13.7k31027
13.7k31027
asked Mar 6 at 23:05
user355834user355834
416
416
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
These are the same answer. Separate to get
$$ sin(2x) dx = dt $$
There are two ways to do this. The first is to integrate directly:
$$ -frac12cos(2x) = t + c_1 $$
$$ cos(2x) = -2(t+c_1) $$
$$ x = frac12 arccos(-2(t+c_1)) $$
This is the answer given by Wolfram.
The second way is to use the double-angle formula
$$ 2sin(x)cos(x) dx = dt $$
$$ sin^2(x) = t + c_2 $$
$$ sin (x) = sqrtt+c_2 $$
$$ x = arcsin(sqrtt+c_2) $$
This is the answer given by MATLAB.
If you're wondering why there two different anti-derivatives of $sin(2x)$, it's because they differ by a constant
$$ sin^2 x = -frac12cos (2x) + frac12 $$
$endgroup$
$begingroup$
[+1] Very didactic answer. Two points are still puzzling for me 1) On the asker side : an initial condition $x(0)=1$ has been introduced. Why ? 2) On the answerer side : why don't you consider as well $sin(x)=-sqrtt+c_2$ ?
$endgroup$
– Jean Marie
Mar 7 at 8:54
$begingroup$
@JeanMarie 1) MATLAB requires an initial condition to solve the problem, so I assumed $x(0)=1$ was put in there as a placeholder. 2) I didn't feel like going into details, since the point was just to illustrate that the 2 answers are more or less equivalent. If you want to be pedantic, the sign of the square root depends on the initial condition given.
$endgroup$
– Dylan
Mar 7 at 8:59
$begingroup$
Why do you use the adjective "pedantic" ? Conventionally, working with real numbers, symbol $sqrt...$ designates a positive quantity, and $-sqrt...$ is for a negative quantity which is different.
$endgroup$
– Jean Marie
Mar 7 at 9:09
$begingroup$
@JeanMarie You take the positive $sqrtcdots$ if the initial condition is positive and the negative $-sqrtcdots$ if the initial condition is negative.
$endgroup$
– Dylan
Mar 7 at 9:18
add a comment |
$begingroup$
A (Matlab oriented) complement to the very didactic answer by @Dylan.
Here is an extension of your program displaying either two or one solution(s). I use some Matlab instructions that may be new to you, in particular with a symbolic initial value $a$ (you had fixed this initial value to $a=1$) that can be constrained to be positive. The first part is with symbolic variables, almost the same as yours ; the second part uses numerical variables in order to see what happens for different values of $a$:
clear all;close all;
syms x(t) a
ode=diff(x)==1/sin(2*x); % no need to take diff(x,t)...
cond=x(0)==a; % a instead of 1
%assume(a>0)
s=dsolve(ode,cond) : % one or two solutions
%%%
T=0:0.01:0.7;
for a=0:0.1:pi/2
g=inline(s(1));plot(T,real(g(a,T)),'r');hold on;
g=inline(s(2));plot(T,real(g(a,T)),'b');hold on;% to be suppressed if a>0
end;
The answer(s) given by Matlab are :
s =
asin((sin(a)^2 + t)^(1/2))
-asin((sin(a)^2 + t)^(1/2))
Which one is the good one ?... Both...
If we introduce "assume(a>0)", Matlab gives a single answer which is the first one.
Other analytical facts could be commented (for example the domains of existence of solutions), but I think the asker will be satisfied with the details already given.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
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
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3138221%2fsimple-differential-equation-in-matlab-and-wolfram-get-two-different-answer%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
These are the same answer. Separate to get
$$ sin(2x) dx = dt $$
There are two ways to do this. The first is to integrate directly:
$$ -frac12cos(2x) = t + c_1 $$
$$ cos(2x) = -2(t+c_1) $$
$$ x = frac12 arccos(-2(t+c_1)) $$
This is the answer given by Wolfram.
The second way is to use the double-angle formula
$$ 2sin(x)cos(x) dx = dt $$
$$ sin^2(x) = t + c_2 $$
$$ sin (x) = sqrtt+c_2 $$
$$ x = arcsin(sqrtt+c_2) $$
This is the answer given by MATLAB.
If you're wondering why there two different anti-derivatives of $sin(2x)$, it's because they differ by a constant
$$ sin^2 x = -frac12cos (2x) + frac12 $$
$endgroup$
$begingroup$
[+1] Very didactic answer. Two points are still puzzling for me 1) On the asker side : an initial condition $x(0)=1$ has been introduced. Why ? 2) On the answerer side : why don't you consider as well $sin(x)=-sqrtt+c_2$ ?
$endgroup$
– Jean Marie
Mar 7 at 8:54
$begingroup$
@JeanMarie 1) MATLAB requires an initial condition to solve the problem, so I assumed $x(0)=1$ was put in there as a placeholder. 2) I didn't feel like going into details, since the point was just to illustrate that the 2 answers are more or less equivalent. If you want to be pedantic, the sign of the square root depends on the initial condition given.
$endgroup$
– Dylan
Mar 7 at 8:59
$begingroup$
Why do you use the adjective "pedantic" ? Conventionally, working with real numbers, symbol $sqrt...$ designates a positive quantity, and $-sqrt...$ is for a negative quantity which is different.
$endgroup$
– Jean Marie
Mar 7 at 9:09
$begingroup$
@JeanMarie You take the positive $sqrtcdots$ if the initial condition is positive and the negative $-sqrtcdots$ if the initial condition is negative.
$endgroup$
– Dylan
Mar 7 at 9:18
add a comment |
$begingroup$
These are the same answer. Separate to get
$$ sin(2x) dx = dt $$
There are two ways to do this. The first is to integrate directly:
$$ -frac12cos(2x) = t + c_1 $$
$$ cos(2x) = -2(t+c_1) $$
$$ x = frac12 arccos(-2(t+c_1)) $$
This is the answer given by Wolfram.
The second way is to use the double-angle formula
$$ 2sin(x)cos(x) dx = dt $$
$$ sin^2(x) = t + c_2 $$
$$ sin (x) = sqrtt+c_2 $$
$$ x = arcsin(sqrtt+c_2) $$
This is the answer given by MATLAB.
If you're wondering why there two different anti-derivatives of $sin(2x)$, it's because they differ by a constant
$$ sin^2 x = -frac12cos (2x) + frac12 $$
$endgroup$
$begingroup$
[+1] Very didactic answer. Two points are still puzzling for me 1) On the asker side : an initial condition $x(0)=1$ has been introduced. Why ? 2) On the answerer side : why don't you consider as well $sin(x)=-sqrtt+c_2$ ?
$endgroup$
– Jean Marie
Mar 7 at 8:54
$begingroup$
@JeanMarie 1) MATLAB requires an initial condition to solve the problem, so I assumed $x(0)=1$ was put in there as a placeholder. 2) I didn't feel like going into details, since the point was just to illustrate that the 2 answers are more or less equivalent. If you want to be pedantic, the sign of the square root depends on the initial condition given.
$endgroup$
– Dylan
Mar 7 at 8:59
$begingroup$
Why do you use the adjective "pedantic" ? Conventionally, working with real numbers, symbol $sqrt...$ designates a positive quantity, and $-sqrt...$ is for a negative quantity which is different.
$endgroup$
– Jean Marie
Mar 7 at 9:09
$begingroup$
@JeanMarie You take the positive $sqrtcdots$ if the initial condition is positive and the negative $-sqrtcdots$ if the initial condition is negative.
$endgroup$
– Dylan
Mar 7 at 9:18
add a comment |
$begingroup$
These are the same answer. Separate to get
$$ sin(2x) dx = dt $$
There are two ways to do this. The first is to integrate directly:
$$ -frac12cos(2x) = t + c_1 $$
$$ cos(2x) = -2(t+c_1) $$
$$ x = frac12 arccos(-2(t+c_1)) $$
This is the answer given by Wolfram.
The second way is to use the double-angle formula
$$ 2sin(x)cos(x) dx = dt $$
$$ sin^2(x) = t + c_2 $$
$$ sin (x) = sqrtt+c_2 $$
$$ x = arcsin(sqrtt+c_2) $$
This is the answer given by MATLAB.
If you're wondering why there two different anti-derivatives of $sin(2x)$, it's because they differ by a constant
$$ sin^2 x = -frac12cos (2x) + frac12 $$
$endgroup$
These are the same answer. Separate to get
$$ sin(2x) dx = dt $$
There are two ways to do this. The first is to integrate directly:
$$ -frac12cos(2x) = t + c_1 $$
$$ cos(2x) = -2(t+c_1) $$
$$ x = frac12 arccos(-2(t+c_1)) $$
This is the answer given by Wolfram.
The second way is to use the double-angle formula
$$ 2sin(x)cos(x) dx = dt $$
$$ sin^2(x) = t + c_2 $$
$$ sin (x) = sqrtt+c_2 $$
$$ x = arcsin(sqrtt+c_2) $$
This is the answer given by MATLAB.
If you're wondering why there two different anti-derivatives of $sin(2x)$, it's because they differ by a constant
$$ sin^2 x = -frac12cos (2x) + frac12 $$
edited Mar 7 at 9:00
answered Mar 7 at 8:41
DylanDylan
13.7k31027
13.7k31027
$begingroup$
[+1] Very didactic answer. Two points are still puzzling for me 1) On the asker side : an initial condition $x(0)=1$ has been introduced. Why ? 2) On the answerer side : why don't you consider as well $sin(x)=-sqrtt+c_2$ ?
$endgroup$
– Jean Marie
Mar 7 at 8:54
$begingroup$
@JeanMarie 1) MATLAB requires an initial condition to solve the problem, so I assumed $x(0)=1$ was put in there as a placeholder. 2) I didn't feel like going into details, since the point was just to illustrate that the 2 answers are more or less equivalent. If you want to be pedantic, the sign of the square root depends on the initial condition given.
$endgroup$
– Dylan
Mar 7 at 8:59
$begingroup$
Why do you use the adjective "pedantic" ? Conventionally, working with real numbers, symbol $sqrt...$ designates a positive quantity, and $-sqrt...$ is for a negative quantity which is different.
$endgroup$
– Jean Marie
Mar 7 at 9:09
$begingroup$
@JeanMarie You take the positive $sqrtcdots$ if the initial condition is positive and the negative $-sqrtcdots$ if the initial condition is negative.
$endgroup$
– Dylan
Mar 7 at 9:18
add a comment |
$begingroup$
[+1] Very didactic answer. Two points are still puzzling for me 1) On the asker side : an initial condition $x(0)=1$ has been introduced. Why ? 2) On the answerer side : why don't you consider as well $sin(x)=-sqrtt+c_2$ ?
$endgroup$
– Jean Marie
Mar 7 at 8:54
$begingroup$
@JeanMarie 1) MATLAB requires an initial condition to solve the problem, so I assumed $x(0)=1$ was put in there as a placeholder. 2) I didn't feel like going into details, since the point was just to illustrate that the 2 answers are more or less equivalent. If you want to be pedantic, the sign of the square root depends on the initial condition given.
$endgroup$
– Dylan
Mar 7 at 8:59
$begingroup$
Why do you use the adjective "pedantic" ? Conventionally, working with real numbers, symbol $sqrt...$ designates a positive quantity, and $-sqrt...$ is for a negative quantity which is different.
$endgroup$
– Jean Marie
Mar 7 at 9:09
$begingroup$
@JeanMarie You take the positive $sqrtcdots$ if the initial condition is positive and the negative $-sqrtcdots$ if the initial condition is negative.
$endgroup$
– Dylan
Mar 7 at 9:18
$begingroup$
[+1] Very didactic answer. Two points are still puzzling for me 1) On the asker side : an initial condition $x(0)=1$ has been introduced. Why ? 2) On the answerer side : why don't you consider as well $sin(x)=-sqrtt+c_2$ ?
$endgroup$
– Jean Marie
Mar 7 at 8:54
$begingroup$
[+1] Very didactic answer. Two points are still puzzling for me 1) On the asker side : an initial condition $x(0)=1$ has been introduced. Why ? 2) On the answerer side : why don't you consider as well $sin(x)=-sqrtt+c_2$ ?
$endgroup$
– Jean Marie
Mar 7 at 8:54
$begingroup$
@JeanMarie 1) MATLAB requires an initial condition to solve the problem, so I assumed $x(0)=1$ was put in there as a placeholder. 2) I didn't feel like going into details, since the point was just to illustrate that the 2 answers are more or less equivalent. If you want to be pedantic, the sign of the square root depends on the initial condition given.
$endgroup$
– Dylan
Mar 7 at 8:59
$begingroup$
@JeanMarie 1) MATLAB requires an initial condition to solve the problem, so I assumed $x(0)=1$ was put in there as a placeholder. 2) I didn't feel like going into details, since the point was just to illustrate that the 2 answers are more or less equivalent. If you want to be pedantic, the sign of the square root depends on the initial condition given.
$endgroup$
– Dylan
Mar 7 at 8:59
$begingroup$
Why do you use the adjective "pedantic" ? Conventionally, working with real numbers, symbol $sqrt...$ designates a positive quantity, and $-sqrt...$ is for a negative quantity which is different.
$endgroup$
– Jean Marie
Mar 7 at 9:09
$begingroup$
Why do you use the adjective "pedantic" ? Conventionally, working with real numbers, symbol $sqrt...$ designates a positive quantity, and $-sqrt...$ is for a negative quantity which is different.
$endgroup$
– Jean Marie
Mar 7 at 9:09
$begingroup$
@JeanMarie You take the positive $sqrtcdots$ if the initial condition is positive and the negative $-sqrtcdots$ if the initial condition is negative.
$endgroup$
– Dylan
Mar 7 at 9:18
$begingroup$
@JeanMarie You take the positive $sqrtcdots$ if the initial condition is positive and the negative $-sqrtcdots$ if the initial condition is negative.
$endgroup$
– Dylan
Mar 7 at 9:18
add a comment |
$begingroup$
A (Matlab oriented) complement to the very didactic answer by @Dylan.
Here is an extension of your program displaying either two or one solution(s). I use some Matlab instructions that may be new to you, in particular with a symbolic initial value $a$ (you had fixed this initial value to $a=1$) that can be constrained to be positive. The first part is with symbolic variables, almost the same as yours ; the second part uses numerical variables in order to see what happens for different values of $a$:
clear all;close all;
syms x(t) a
ode=diff(x)==1/sin(2*x); % no need to take diff(x,t)...
cond=x(0)==a; % a instead of 1
%assume(a>0)
s=dsolve(ode,cond) : % one or two solutions
%%%
T=0:0.01:0.7;
for a=0:0.1:pi/2
g=inline(s(1));plot(T,real(g(a,T)),'r');hold on;
g=inline(s(2));plot(T,real(g(a,T)),'b');hold on;% to be suppressed if a>0
end;
The answer(s) given by Matlab are :
s =
asin((sin(a)^2 + t)^(1/2))
-asin((sin(a)^2 + t)^(1/2))
Which one is the good one ?... Both...
If we introduce "assume(a>0)", Matlab gives a single answer which is the first one.
Other analytical facts could be commented (for example the domains of existence of solutions), but I think the asker will be satisfied with the details already given.
$endgroup$
add a comment |
$begingroup$
A (Matlab oriented) complement to the very didactic answer by @Dylan.
Here is an extension of your program displaying either two or one solution(s). I use some Matlab instructions that may be new to you, in particular with a symbolic initial value $a$ (you had fixed this initial value to $a=1$) that can be constrained to be positive. The first part is with symbolic variables, almost the same as yours ; the second part uses numerical variables in order to see what happens for different values of $a$:
clear all;close all;
syms x(t) a
ode=diff(x)==1/sin(2*x); % no need to take diff(x,t)...
cond=x(0)==a; % a instead of 1
%assume(a>0)
s=dsolve(ode,cond) : % one or two solutions
%%%
T=0:0.01:0.7;
for a=0:0.1:pi/2
g=inline(s(1));plot(T,real(g(a,T)),'r');hold on;
g=inline(s(2));plot(T,real(g(a,T)),'b');hold on;% to be suppressed if a>0
end;
The answer(s) given by Matlab are :
s =
asin((sin(a)^2 + t)^(1/2))
-asin((sin(a)^2 + t)^(1/2))
Which one is the good one ?... Both...
If we introduce "assume(a>0)", Matlab gives a single answer which is the first one.
Other analytical facts could be commented (for example the domains of existence of solutions), but I think the asker will be satisfied with the details already given.
$endgroup$
add a comment |
$begingroup$
A (Matlab oriented) complement to the very didactic answer by @Dylan.
Here is an extension of your program displaying either two or one solution(s). I use some Matlab instructions that may be new to you, in particular with a symbolic initial value $a$ (you had fixed this initial value to $a=1$) that can be constrained to be positive. The first part is with symbolic variables, almost the same as yours ; the second part uses numerical variables in order to see what happens for different values of $a$:
clear all;close all;
syms x(t) a
ode=diff(x)==1/sin(2*x); % no need to take diff(x,t)...
cond=x(0)==a; % a instead of 1
%assume(a>0)
s=dsolve(ode,cond) : % one or two solutions
%%%
T=0:0.01:0.7;
for a=0:0.1:pi/2
g=inline(s(1));plot(T,real(g(a,T)),'r');hold on;
g=inline(s(2));plot(T,real(g(a,T)),'b');hold on;% to be suppressed if a>0
end;
The answer(s) given by Matlab are :
s =
asin((sin(a)^2 + t)^(1/2))
-asin((sin(a)^2 + t)^(1/2))
Which one is the good one ?... Both...
If we introduce "assume(a>0)", Matlab gives a single answer which is the first one.
Other analytical facts could be commented (for example the domains of existence of solutions), but I think the asker will be satisfied with the details already given.
$endgroup$
A (Matlab oriented) complement to the very didactic answer by @Dylan.
Here is an extension of your program displaying either two or one solution(s). I use some Matlab instructions that may be new to you, in particular with a symbolic initial value $a$ (you had fixed this initial value to $a=1$) that can be constrained to be positive. The first part is with symbolic variables, almost the same as yours ; the second part uses numerical variables in order to see what happens for different values of $a$:
clear all;close all;
syms x(t) a
ode=diff(x)==1/sin(2*x); % no need to take diff(x,t)...
cond=x(0)==a; % a instead of 1
%assume(a>0)
s=dsolve(ode,cond) : % one or two solutions
%%%
T=0:0.01:0.7;
for a=0:0.1:pi/2
g=inline(s(1));plot(T,real(g(a,T)),'r');hold on;
g=inline(s(2));plot(T,real(g(a,T)),'b');hold on;% to be suppressed if a>0
end;
The answer(s) given by Matlab are :
s =
asin((sin(a)^2 + t)^(1/2))
-asin((sin(a)^2 + t)^(1/2))
Which one is the good one ?... Both...
If we introduce "assume(a>0)", Matlab gives a single answer which is the first one.
Other analytical facts could be commented (for example the domains of existence of solutions), but I think the asker will be satisfied with the details already given.
edited 2 days ago
answered Mar 7 at 10:19
Jean MarieJean Marie
30.6k42154
30.6k42154
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3138221%2fsimple-differential-equation-in-matlab-and-wolfram-get-two-different-answer%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown