Mathematica/Matlab Tan[x] == 1/x

  • MATLAB
  • Thread starter Dustinsfl
  • Start date
In summary: You can zoom in as much as you want and move the cursor to get the accurate location.As I have indicated in my post #2 click on the "points of interest" in the menu bar. Then the points will be marked on the graph. You can zoom in as much as you want and move the cursor to get the accurate location.In summary, to solve for the first 10 positive values of tan x = 1/x, you can use numerical methods in Matlab or Mathematica, or use the Desmos calculator and click on the "points of interest" to find the points of intersection between the two graphs. The first 10 values with an accuracy of a few decimal points are 0.86, 3.426,
  • #1
Dustinsfl
2,281
5
How can I tell Mathematica or Matlab to solve tan x = 1/x?

In Mathematica, I tried NSolve[Tan[x]==1/x,x] but I was told Mathematica can't do this.

I am trying to find the the first 10 positive values.

In Matlab, I tried
Code:
syms x
solve(tan(x) == 1/x)

I want to return the first 10 values. Matlab returned -263
 
Last edited:
Physics news on Phys.org
  • #2
dwsmith said:
How can I tell Mathematica or Matlab to solve tan x = 1/x?

In Mathematica, I tried NSolve[Tan[x]==1/x,x] but I was told Mathematica can't do this.

I am trying to find the the first 10 positive values.

In Matlab, I tried
Code:
syms x
solve(tan(x) == 1/x)

I want to return the first 10 values. Matlab returned -263

You can find the approximate values using a numerical method. Alternatively the values(accurate for two decimal places) can be found using the Desmos calculator. Click on the "points of interest" and you can find the points of intersection of the two graphs.

[graph]4hhttfxqvi[/graph]
 
  • #3
Sudharaka said:
You can find the approximate values using a numerical method. Alternatively the values(accurate for two decimal places) can be found using the Desmos calculator. Click on the "points of interest" and you can find the points of intersection of the two graphs.

[graph]4hhttfxqvi[/graph]

Isnt there a way for Matlab or Mathematica just to solve it numerical and spit out the the positive first 10 solutions?
 
  • #4
dwsmith said:
Isnt there a way for Matlab or Mathematica just to solve it numerical and spit out the the positive first 10 solutions?

I don't know much about Matlab or Mathematica as I don't use them (I use Maxima). However you can implement numerical methods through both programs(such as >>this<<). To what accuracy do you expect the solutions?
 
  • #5
Sudharaka said:
I don't know much about Matlab or Mathematica as I don't use them (I use Maxima). However you can implement numerical methods through both programs(such as >>this<<). To what accuracy do you expect the solutions?

Thanks but I don't understand Matlab that well to decipher that into what I need.
 
  • #6
dwsmith said:
Thanks but I don't understand Matlab that well to decipher that into what I need.

If it helps, I can use Maxima to find the solutions to a given accuracy. To what accuracy do you want the solutions?
 
  • #7
Sudharaka said:
If it helps, I can use Maxima to find the solutions to a given accuracy. To what accuracy do you want the solutions?

A few decimal points.
 
  • #8
dwsmith said:
A few decimal points.

In that case I think Desmos will give you reasonably good approximations. I was thinking whether you want an accuracy that exceeds three decimal places. Here's the first ten,

0.86, 3.426, 6.437, 9.529, 12.645, 15.771, 18.902, 22.036, 25.172, 28.31
 
  • #9
Sudharaka said:
In that case I think Desmos will give you reasonably good approximations. I was thinking whether you want an accuracy that exceeds three decimal places. Here's the first ten,

0.86, 3.426, 6.437, 9.529, 12.645, 15.771, 18.902, 22.036, 25.172, 28.31

But how do we know when clicking near the intersection on Desmos if it is actually that location and not a little left or right?
 
  • #10
dwsmith said:
But how do we know when clicking near the intersection on Desmos if it is actually that location and not a little left or right?

As I have indicated in my post #2 click on the "points of interest" in the menu bar. Then the points will be marked on the graph.
 

What is the purpose of the equation "Mathematica/Matlab Tan[x] == 1/x"?

The purpose of this equation is to determine the value of x that satisfies the equation. This can be useful in solving mathematical problems or analyzing data.

What is the difference between Mathematica and Matlab?

Mathematica and Matlab are both software programs used for mathematical and numerical computations. However, Mathematica is primarily used for symbolic calculations, while Matlab is used for numerical computations.

How can I use Mathematica/Matlab to solve the equation Tan[x] == 1/x?

In Mathematica, you can use the Solve function to find the value of x that satisfies the equation. In Matlab, you can use the fsolve function to solve for x.

Can the equation Tan[x] == 1/x have more than one solution?

Yes, the equation can have multiple solutions. This can be seen by graphing the equation and observing where the curve intersects the x-axis.

Are there any restrictions on the values of x in the equation Tan[x] == 1/x?

Yes, there are restrictions on the values of x in this equation. In both Mathematica and Matlab, x cannot be equal to 0 or any odd multiple of π/2, as this would result in a division by 0 error.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
146
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
837
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
910
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
Back
Top